Potatoes turn green when they are exposed to sunlight or damaged. The green pigment comes from chlorophyll. Sunlight can also cause potatoes to produce the toxin solanine.