When potatoes are exposed to excessive light, a green skin color forms from chlorophyll development. The green chlorophyll increases the production of a toxic substance in the fruit called solanine.
A bite or two isn’t harmful but if eaten in quantity, it may cause illness. You don’t have to waste these potatoes as you can remove the solanine by pealing the potato below the green, back into the white flesh. To prevent green potatoes always store potatoes in the dark and avoid buying greenish potatoes in the grocery.