They should be fine, obviously the light has caused them to turn green but this should not transfere to the new potatoes when they grow, providing you keep them earthed up or covered when growing. Good Luck.
Threw out all my manky green & sprouting potatoes onto a mature compost last year, mixed the earth over them so they were well covered and got a pretty reasonable crop. I think the secret is to exclude the light from the tubers while they're growing and they will be fine. It's when you eat green skinned potatoes that the problem starts.
kos, Yes they are, all green parts of the potato are poisonous and contain solannine and the white shoots contain glycoakaloids. Symptoms are Nausia, Vomiting,Salivation, Drowsiness, Abdominal pain and Diarrhea.