Tomatoes contain two pigments for photosynthesis—chlorophyll, which is green, and lycopene, which is red. When tomatoes start to grow, they contain much less lycopene than chlorophyll, which gives them their green color. But when harvest season arrives, the days shorten and temperatures drop, causing chlorophyll to dissolve and lycopene to take over the shade of the fruit. During this time, sugar levels rise, acid levels drop, and the tomato softens. It becomes ready to eat.
The trick is that this final stage of a tomato’s life takes place in a relatively short period of time—and that poses a big problem for farmers trying to get ripe produce to grocery stores before it rots. Most farmers begin picking tomatoes while they’re still green on the vine, and then they treat them with a ripening agent called ethylene gas to induce the red color. Far from being a synthetic compound, ethylene gas is produced naturally by other fruits and vegetables as they ripen. In fact, bananas release ethylene gas directly into the air. If you place a ripe banana next to a green tomato, the tomato will ripen, too.