Sunberry (aka Wonderberry) is a little purple berry in the nightshade family (Solanaceae), bred by Luther Burbank himself 100 years ago (Solanum guinense x villosum). I grew it last year both on my deck and in my research plot alongside another novelty purple-berried Solanum, Garden Huckleberry (S. melanocerasum or scabrum?).
The taxonomy of this family is far from figured out. Tomato (which you'd think we'd understand pretty well!) was removed from the genus "Lycopersicon" to join its potato and eggplant sisters in "Solanum" just a few years ago. The various species of "nightshade" are a total mess - no less because it's one of those names that Europeans threw around pretty loosely as they discovered new plants.
From what I can tell, the classic "deadly nightshade" of European folklore is Atropa belladonna (same Solanaceous family, different Solanaceous genus). Europeans also named multiple species in this family as "black nightshades." Certainly, not everything called a "black nightshade" is closely related, but there seems to be a core cluster of extremely genetically-diverse species associated with the European black nightshade, S. nigrum: including S. villosum, S. americanum (American black nightshade) and S. retroflexum (some claim this as Sunberry's "species") among others.
Depending on who you ask, Sunberry and Garden Huckleberry were either bred from African and European nightshades or simply ARE individuals of these species. To further complicate things, some people use these names (plus "Wonderberry") to refer specifically to certain wild nightshades, which of course is the whole problem with using common names in the first place! There additionally seems to be a lot of uncertainty over whether these different wild black nightshade species are actually poisonous or not in the first place.
The whole Solanaceae family is riddled with various poisonous alkaloids - some species more than others, and often in the foliage more than the fruit, but I haven't yet been able to find any publications that really sort this out. I'd bet there's a lot of variation in chemical composition within each species thanks to their diverse genetics and environments (especially as they've been tracked in circles all around the globe). It could be that much of their reputation is ill (or at least inconsistently) deserved. It doesn't take too many bad experiences to establish something as "poisonous" in a culture. Tomato, just thanks to its similar appearance to other nightshades, was planted as an inedible ornamental in Europe for years before people were convinced its berries weren't poisonous!
This all leads me back to the statistics I ran this afternoon. One of my side projects is to compare the chemical composition of various wild and domesticated Solanaceaeous berries. When I compared the "metabolic fingerprints" of a broad array of Solanaceous berries (using a solvent extract that picks up poisonous alkaloids), Sunberry was almost indistinguishable from the nightshade S. americanum (Garden Huckleberry fell in the main clump with a lot of edible crops and potato berries). I have a lot of work to do to validate this analysis and figure out which chemicals actually account for which differences before I can make any trustworthy statement on this but I thought it was pretty fascinating all the same. I find it hard to believe that a crop (even a novelty one) that's been consumed for 100 years is poisonous (especially since consuming similar alkaloids in green potato tubers makes people feel sick pretty quickly), but maybe my particular accession of American black nightshade is perfectly edible?*
Maybe we're like the early modern Europeans all over again with their tomatoes - writing off perfectly edible plants as poisonous?
*don't go test-tasting wild plants now. that's just stupid..
...besides, both Sunberry and Garden Huckleberry are, in my opinion, horrible, worthless crops.
I never appreciated abscission zones until I grew Sunberry. Ripe Sunberry berries refuse to obligingly pop off their pedicels when ripe. They usually goosh out their innards as you try to remove them, leaving you holding the little purple skin as the seedy-slurry drips from your fingers. Even if you manage to pick a handful, they don't have much flavor (though more than the willfully taste-free Garden Huckleberry). My boss and his wife tried to make Sunberry jam, but even after adding an absurd amount of sugar, the mixture refused to set.
(picture from Seed Savers - hopefully they won't mind since I plan on spending a small fortune there the first spring I have a yard)