Potatoes, eggplants, tomatoes, tobacco and petunias are all plants from the nightshade family, Solanaceae. The family includes other common food plants, such as chili peppers, bell peppers and tomatillos, but it also includes highly toxic species, such as Jimson weed, deadly nightshade and mandrake.
The nightshade family includes about 2,700 highly diverse species. Most are tropical, and the greatest number of species are native to South and Central America; however, every continent except Antarctica has native nightshade species. Many of these plants have edible fruits or tubers, but even the plants commonly used for food often have poisonous parts. Jimson weed has a history of use in Native American ceremonies, while herbal practitioners have used mandrake to treat pain and sleep disturbance, but both plants can kill when ingested.
The culprits behind the nightshades' toxicity are chemical compounds known as alkaloids. Chemicals from this group include scopolamine, atropine, solanine, hyoscyamine and nicotine. While many of these alkaloids are highly toxic, some have medical uses. For instance, a drop of atropine dilates the eyes, a property useful to eye doctors. This same property also gave rise to atropine's use for cosmetic purposes in ancient Egypt, Babylonia and Italy and is the reason why atropine's source plant, deadly nightshade, also has the name "belladonna," which means "beautiful lady" in Italian.
Another group of alkaloids, known as capsaicins, is responsible for the heat in chili peppers. While capsaicins are not toxic to human beings, they cause an irritation perceived as heat in mucous membranes, such as the lining of the mouth. Because of this property, capsaicin is also the basis for pepper spray, a useful deterrent against aggressive humans and other mammals.