Every article on edible flowers that I have ever read advises caution, but encourages the use of flowers in everything from desserts to salads. The reasoning is usually that the Victorians did it all the time, so it would be lovely, quaint and old-fashioned for us to do it too. According to Dr. Pip, the reason we no longer consume large quantities of crystallized violets, as one example, is that they often cause diarrhoea and cramps. Quaint.
Most gardeners are aware that all parts of the tomato plant are toxic except the fruit, but apparently even the unripe fruits contain harmful alkaloids, so traditional recipes including green tomatoes should be consumed rarely, or not at all. Spinach and Swiss chard can become poisonous if grown in conditions where too much nitrogen is present, as the accumulated nitrates can cause illness. Dr. Pip advises going easy on chemical fertilizers and even manure around these and other crops. Lettuce that has gone to seed becomes toxic, some strains of lima bean contain too-high levels of prussic acid, which is essentially cyanide (so only grow varieties offered by reputable seed companies), sorrel contains oxalic acid which is toxic, and even beet greens, supposed for generations to be nutritious, are now coming under scrutiny as often containing high levels of oxalic acid as well. Even if they don't poison you, they may cause liver and kidney damage, and eventually death. This is scary stuff!
Well, we have to eat something, but this article makes it clear that caution is necessary. If you are thinking of sampling a new plant, be sure that several reputable sources list it as edible, and if even one says that it may be poisonous, it should probably be avoided. For example, I have seen Mountain Ash (Sorbus) berries labelled as both edible and poisonous. Apparently the flavour is mediocre at best, however, so you really might as well just avoid it and plant a cherry tree instead. Just don't eat the leaves, bark or pits!