Both coffee and soda have a dark pigment that can stain your teeth. However, coffee can only stain the teeth after extended exposure to a tooth with weakened enamel. On the other hand, the sugar in the soda and its dark pigment can cause more harm to your teeth.