What causes the red colour in tomatoes ?
Tomatoes are rich in lycopene which is a type of carotene. Those are generally pigments that capture additional frequencies of light that chlorophyll doesn't. They also are part of a system that redirects excess energy to prevent cell damage. Many carotenes can be converted into vitamin A but not lycopene. Even though it is probably beneficial to eat, it isn't particularly nutritious. That makes me think that the red colour is there mainly as a signal that the fruit is ripe. They are quite poisonous before being ripe so it is important for the plant to advertise that the fruits are ready. It doesn't want to ripen before the seeds are viable and fully developed.