There is no single reason for toxic plants to be as potentially dangerous as some of them are. They are toxic by various means, and to various degrees. Some actually seem to be incidentally toxic. Many are intentionally and justifiably toxic. A few live in home gardens and landscapes. Of these, a few surprisingly produce safely edible fruits and vegetables!
Immobility is a major disadvantage for plants. Those that begin to grow where resources are inadequate are unable to relocate to more accommodating situations. Those that live within ecosystems that periodically burn must either regenerate efficiently after fire, or be resilient to fire. Flowers of all plants must rely on other organisms or wind for pollination.
Since plants are immobile, they can not evade other organisms that eat them. Therefore, some do what they can to be unappetizing for the organisms that are most threatening to them. Some use thorns or similar protective devices. Unpalatable tomentum (fuzz) works for others. Many use unappealing flavor. Some are unappetizing because they are toxic.
Toxic plants are generally not toxic to a broad range or organisms. Insects eat plants that are very toxic to mammals. Onions, although commonly consumed by humans, are toxic to canines. Fortunately, most organisms instinctively know what plants are toxic to them, and avoid eating them. Unfortunately, humans and canines are occasionally exceptions.
Because young children put random items into their mouths, and puppies chew anything that they can get their teeth around, they should not have access to toxic plants. Morning glory, foxglove, yew, oleander and castor bean are some of the more poisonous of plants that are common in home gardens. Dieffenbachia is a potentially dangerous houseplant.
African sumac and smoketree are related to poison oak. Although not so poisonous, they are incidentally toxic allergens to those who are sensitive to them. (Incidental toxins may not be intentionally deterrent to consumptive organisms.) Hellebores are both poisonous and very allergenic. Poinsettias and their relatives are toxic because of their caustic sap.
Plants are so much more intelligent than they get credit for. Many use color, fragrance and flavorful nectar to get insects and animals to disperse their pollen for them. Some provide fruit for animals that inadvertently take and disperse their seeds. Others use barbs or sticky substances to attach their seeds to unknowing animals that take them away. Plants have all sorts of techniques for exploiting those who are more animated than they are. After all, immobility has certain disadvantages.
Because plants can not get away from the animals and insects that eat them, many have developed techniques for being unappealing. Plants that live in deserts where edible foliage is relatively scarce are famous for their nasty thorns and spines, like those of cacti and agave. Hellebore and poinsettia have caustic sap that make them unpalatable. The naturally aromatic foliage of many edible herbs, like rosemary and lavender, is actually intended to repel grazing animals with sensitive noses.
Some plants unfortunately rely on toxicity for protection. Many plants are only partially toxic. For example, apples are intended to be eaten safely by animals that disperse the seeds within, but their seeds are toxic enough to avoid getting eaten by rodents after dispersal. Potato, tomato, rhubarb, asparagus and elderberry plants all produce edible fruits or vegetables, but also have poisonous parts. Some edible fruits and vegetables, like grapes and onions, are edible to humans, but toxic to dogs.
Foxglove, angels’ trumpet, morning glory, yew, rhododendron, azalea, oleander and castor bean are some of the more notably toxic plants often found in home gardens. Wisteria, holly and ivy produce toxic seeds and fruits. Dieffenbachia is a popular but very toxic houseplant. Although mostly safe, toxic plants can be a problem where young children might put things into their mouths, or where puppies are in that chewing phase.
Early American settlers from Europe had a lot to learn about the plants of North America. After their first harsh winter without much food, many were eager to eat the first fresh greens of spring, which was sometimes the very poisonous jimson weed. Those who were not lethally poisoned right away might have hallucinated and told their friends that they could fly, and consequently got burned as witches.
It should be no wonder that some early Americans were hesitant to try tomatoes, which are related to jimson weed. Potatoes are also related, and their fruit, foliage and stems actually are toxic. Pokeweed (unrelated) was probably riskier, since the same young shoots that can be cooked as greens become toxic as they mature. Their poisonous berries, which were used as ink back then, look delicious.
There were other potentially dangerous edibles brought from Europe and other places as well. Rhubarb, which makes such great pies, is petioles (leaf stalks) for toxic leaves. Both American and European elderberries are slightly toxic before getting cooked into jelly or pie. Elderberry juice must be cooked and then given yeast to make wine. Figs and mulberries can be eaten right off their trees, but their sap is caustic enough to be irritating to the skin.
The seeds of apples, pears, peaches, nectarines and apricots can be toxic if too many are eaten. They are not a problem only because they are not eaten. However, apricot kernels can be roasted and eaten like almonds because the cooking process denatures the toxins. Separating the small kernels from the hard shells is much more work than it is for almonds, but they supposedly have great flavor.
Just like for apricot kernels, pokeweed and elderberries, the heat of cooking makes taro edible. The foliage can be eaten as stewed greens. The big and starchy corms (bulb-like stems) are something like potatoes. All parts of taro are toxic while raw. There are actually a few toxic plants that are edible once cooked. For a few others, it is important to know what parts are edible, and what parts are toxic.