Avoid buying potatoes with a green tinge. If you do end up with one, be sure you remove all of that green area before cooking and eating the potato.
It will not harm you in small quantities, but ingesting a large amount of that could make you ill.
From wholehealthmd.com comes the following on buying potatoes:
If possible, choose individual potatoes from a bulk display. Buy a large bag (five or 10 pounds) only if you can check the condition of the potatoes through the packaging--and if you are going to use them before they spoil.
Look for clean, smooth, well-shaped potatoes. Potatoes should feel firm, the "eyes"--the buds from which sprouts can grow--few and shallow, and the skins free of cracks, wrinkles, or dampness.
Reject potatoes with black spots, bruises, or other discolorations. Reject potatoes with a green tinge to the skin: This is an indication that solanine--a naturally occuring toxin--is present, a result of a potato's exposure to the sun (green-tinged potatoes are often called "sun-burned").
Also reject potatoes that are sprouting--a sprouting potato, though edible, has started to age and may contain increased amounts of solanine.
Hope that helps.