Potatoes should be kept away from sunlight because exposure to light causes them to produce chlorophyll (turning them green) and solanine, a toxic alkaloid, making them taste bitter and potentially harmful if consumed in large quantities.
When potatoes are exposed to sunlight, they undergo a process similar to photosynthesis, leading to the production of chlorophyll. Chlorophyll is a harmless pigment that gives plants their green color. However, the presence of chlorophyll is an indicator that the potato is also producing solanine. Solanine is a glycoalkaloid that acts as a natural pesticide, protecting the potato from insects and diseases. While small amounts of solanine are generally harmless, higher concentrations can cause gastrointestinal issues such as nausea, vomiting, and diarrhea. In rare cases, very high levels of solanine can lead to more severe neurological problems. Therefore, it's best to avoid eating potatoes that have turned green or have sprouted extensively. Proper storage in a dark, cool, and dry place minimizes the production of both chlorophyll and solanine, ensuring the potatoes remain safe and palatable.
If only a small part of the potato is green, you can cut away the green portion and the surrounding area. However, if the potato is extensively green or tastes bitter, it's best to discard it entirely to avoid any potential health risks.