For potatoes, it's a crystaline alkaloid called solanine that is poisonous to chicken - for white potatoes; they are from the nightshade family. It's in the green parts of the plant, in the raw potato (sometimes you get a batch and you see a greenish tint under the skin?, that part). Solanine destroys red blood cells and can cause diarrhea and heart failure - in large enough doses. Remember - the dose (and route of entry) equals the poison. Also of note, sweet potatoes are in the morning glory family and are not a danger (raw or cooked) to chickens.
I feed my girls cooked potato, in moderation, but try to cut off the skins first. Red tomatoes are also in the nightshade family - though I do feed them, again in moderation, to the girls. They seem to love both.