Answer:
When a penny is new, it's bright and shiny, but like most other metals, after oxidization (exposure to oxygen) or in the presence of moisture or salts, it can be covered by a dull oxide coat.
Coca-Cola is 0.055% phosphoric acid (this contributes to the zingy taste and fizziness). The phosphoric acid in Coke removes the oxide coat on the pennies, thereby leaving the metal shiny.
Remember though that you should NEVER try to clean a collectible coin. Cleaning is OK for ordinary coins you get in change, but chemicals damage the outer surface of a coin and reduce its value if it's collectible.