As a concrete example, both tomato and potato are in the nightshade family as defined by their biological classification.
However, I don't think a tomato tastes like a potato at all.
Obviously the biological classification is based upon physical characteristics as well as the genetic make up of the food.
In particular, I'm thinking about the various families in the plant family. Is there a relation to taste and biological classification?
Best Answer
Yes, they are certainly connected. But as with many connections in the real world, it is not a perfect +1 correlation. So, just because tomatoes and potatoes are related and they don't taste similar, it doesn't mean that no two related plants taste similar, or that similar taste in related plants is due to random chance.
First, many people talk about "taste" as if it were one thing. In fact, there are lots of things which contribute to taste. It can be roughly divided into a combination of four factors: the combination of the basic five tastes (sweet, sour, salty, bitter and umami), the texture, the aroma of the food, and the taster's internal psychological factors(1). Each food has the first three of them, as well as cues which trigger the fourth.
I won't discuss the psychological factor here, as I don't have enough data on it, and also because it is not intrinsic to the food itself, but to the combination of food and taster. So let's look at the other three.
Basic taste. This can be a hit and miss in related foods.
Texture. This is not related to family very much. The texture varies tremendously within a plant, depending on which part you take from the plant. Cherry tree wood has a texture more similar to pear tree wood than to a cherry fruit or a cherry leaf. Texture is caused by the macro-mechanical properties of the most abundant stuff in plants, such as the starch in grains, the fructose-in-water sticky fruit juice, or the sturdy hemicellulose in stems and leaves. These are roughly similar between plants - two starches may be slightly different, but when packed in a kernel, they feel similar to the tooth. And frequently, the same family can produce different types of starches (you can have mealy or non-mealy potatoes, mealy or non-mealy rice, etc.). So, expect to find similar texture in plant foods not between related families, but within related parts of the plant. And besides, expect the texture to change drastically in response to cooking.
Flavor. This is the area where relations are most apparent. Small differences in a molecule mean huge differences to the way it is perceived (I think that there were examples where it was not really the substance, but its racemic structure which mattered for how its flavor will be perceived). The aromatic substances in plants are family-specific and so flavor is highly related to the family tree of the plant. It is for example very obvious in taste that oregano and thyme are related more closely than, say, oregano and ginger. Similarly, the taste of pumpkins and melons can be surprisingly similar if you get a melon grown without sufficient sun (sun will produce lots of sweetness and aromatics in the melon, which will change its taste profile). Of course, there will be cases when just one plant from a given family evolved to contain a given chemical, which we consider signature for its flavor, and then people may start arguing that there is no relation. But if you take this one chemical from the mix, it will probably taste a lot like its cousins. There are also examples for plants without much relation containing the same substance and therefore exhibiting a similar flavor, but they are rarer. The chemical responsible for the flavor of anise is such an example, it is found in several plants without close relation.
Note that your example is perfectly accounted for by this explanation. Tomatoes and potatoes are indeed part of the same family. But the potato is an underground tuber, while the tomato is a fruit, so totally different parts of the plant. None of them has a strong signature flavor - you can't smell a potato from far away. Tomato is better, but it still has other elements dominating its taste profile, including the interesting combination of sour and umami seldom found in other plants, and its juicy texture combining mealy-moist tissue with jellylike seed-studded substance which is also more acidic than the rest. We don't even eat the parts of the tomato which have most aroma (the stem and leaves). So, on the level where we'd expect most similarity - flavor - we have little contribution to the taste of either of them. On the other two levels, the fact that they are different plant parts dominates their level of difference.
Footnotes
(1) these work in unexpected ways: for example, I once read a study where people had to guess the taste of gummy bears. The bears were rigged, so that the flavor did not match the color. People basically guessed based on color, flavor - they declared that the yellow ones were lemon, even though they had been flavored with cherry, etc.
(2) In this post, I will be only speaking of botanical fruit and disregard the homonymous "fruit" as used in the kitchen. So, tomatoes are a fruit here.