And as with both those important questions, science has finally provided an answer: a meteorite.

The same flying space rock that likely wiped out the dinosaurs also gave tomatoes their appealing red color. How do we know? About 65 million years ago, scientists believe, a meteor impact incinerated a large swath of the planet, threw up a massive ash cloud and prompted to the extinction of most dinosaurs; soon afterwards, the plant that eventually evolved into the tomato tripled the size of its genome, according to Phys.org — adding at least one set of genes that turned its fruit a bright red. This suggests the tomato’s distant ancestor experienced conditions that made being a plant pretty difficult, say scientists. Expanding its genome gave the tomato more genetic options and increased its chances of survival.

When conditions brightened, however, the plant winnowed down its genes, keeping the ones that made its fruit red. It also ditched genes that produced toxins — a fact which sets it apart from the inedible fruit of another member of the deadly nightshade family, the potato. (The edible part of a potato is the root, not the fruit.)

How did scientists find this out? By sequencing the tomato’s genome, and comparing it with nightshade plants. An analysis of a modern tomato from Holland, for example, showed it had a genome that differed only 0.6 percent from that of its wild ancestor, which was likely brought to Europe from South America by the Spanish in the 15th century.

The researchers — René Klein Lankhorst and a team from Wageningen University in Holland — have published the first sequencing of the tomato genome in the current issue of Nature. They’re also making some of the genome analyses available on their website, in case any enterprising farmer/geneticists are interested in growing an even yummier variety.