The leaves, stems, and green unripe fruit of the tomato plant,[34] as a member of the plant genus Solanum (Nightshade), contain the poison Solanine, which is toxic to humans and animals. Children have been poisoned by a tea produced from the leaves of the tomato plant. The fresh fruit is however harmless.[34]
http://en.wikipedia.org/wiki/Nightshade
Here's the poison:
http://en.wikipedia.org/wiki/Scopalamine