Soda stains teeth mostly because of the inclusion of acids and dyes in sodas. The sugar in soda turns into acid on the surface of the teeth that can erode the enamel.
Drinking soda does more damage to teeth in addition to staining them. Phosphoric acid, an ingredient in sodas, erodes enamel similarly to the way sugar does on teeth. Lighter-colored drinks, such as lemon-lime flavored sodas, have sugars and acids on the ingredient list, and they can stain and erode teeth as well. Dentists recommend drinking soda through a straw to minimize staining and tooth erosion, according to WebMD.