This is the time of year in the Pacific Northwest when many wild fruits are evident, their conspicuous colors standing out against the green landscape. Most of them are eaten by birds, but some of them are toxic to humans, for example, red elderberry (Sambucus racemosa), red baneberry (Actaea rubra), and deadly nightshade (Solanum dulcamara). Why can birds eat these fruits and we (and often other mammals) can’t?
Here we have to deviate from known facts and move into the speculative realm. In other words, we know what but we don't know why. But this is a subject about which I have speculated for many years, since I was first told about a poisonous blueberry (Pernettya) in the mountains of Costa Rica.
We all know that bright fruits are intended to attract and be eaten by birds, their seeds defecated out at some other time and place. This is the way these plants get their seeds dispersed.
It would seem that it is in a plant's best interest to have its seeds dispersed at some distance from the parent plant to avoid competition with it for light, water, and nutrients. Thus birds, with their great mobility, should make excellent seed dispersers. Mammals are just as fond of fruits as birds are, but they are not so mobile and are probably less effective at dispersing seeds. Therefore, we might expect some plants to evolve mechanisms to discourage mammals while at the same time encouraging birds.
I consider this a likely explanation of the many kinds of fruits that are eaten by birds but poisonous to some or all mammals (including humans). Birds and mammals have a long independent evolution, and it would not be surprising to find compounds that were toxic to one group but not the other.
I am inclined to extend this reasoning to account for two other types of plant adaptations. Many plants produce skin-contact poisons, and all the ones I know about produce edible fruits and bird-dispersed seeds. Poison ivy is a good local example. This might also be an adaptation to keep mammals away from their fruits.
Finally, think of all the spiny shrubs that produce edible berries, for example blackberries and roses and gooseberries. Might this not be still another way to keep those hungry mammals away? The common wisdom is that spines protect the leaves from potential herbivores, but why not question the common wisdom? Remember, a mammal has to climb into a plant, while a bird can fly in and out without a scratch.
The only data I know of to support this hypothesis comes from a study of chili peppers (Capsicum) in the Southwest conducted by Don Norman, Seattle ornithologist and toxicologist. Mammals shunned the fruits while birds ate them avidly (perhaps birds always eat avidly). There is much more material here for PhD dissertations. The fact that the poisonous baneberry produces both bright red and white berries is surely a fascinating natural-history story of its own. And why does red elderberry have a black-fruited subspecies at high elevations in the Northwest?