FRUIT RIPENING
Fruits are designed to be eaten by the animals - fruits are attractive, they taste nice, and they are nutritious. From the plant's point of view, the most important part of having its fruits eaten is that the seeds in the fruit become dispersed by the animal - it will pass the seeds out at some distant place and give them some of its own nutrition as well. This is how plants and animals work for each other! With humans eating fruits it's more of a different story of course, since we are not spreading the fruit seeds all around the planet, although we tend to cultivate the plants in return.
It is quite amazing how fruits develop, that is how they ripen. Fruit ripening is a process that doesn't start until the plant is ready to send out its seeds. When the fruit goes through the ripening process, it becomes edible for us, as the nice juices and taste, as well as colors, develop and attract us and animals to eat it. In short, fruit ripening is a part of the "sexual" attraction across the boundaries of the species.
Fruits develop from a flower, from its female part (ovary) that contains the seeds. The skin of the fruit and the flavorful flesh are surrounding the seeds, all together making up the ovary, so to speak. But to get to the mature fruit stage, the female must be "impregnated", which is accomplished by male "sperms" called pollen. (I use the humanized terms in quotation marks, so it is easier to associate the phenomena with something we all know.) When the male pollen hits the female ovary, a juice of hormones will trigger the growth of the fruit skin and flesh. There are some exceptions to this initiation of fruit ripening because there are seedless fruits like bananas, or the seedless grapes, and they don't need the male pollen to grow up.
In the second phase of fruit ripening, the ovary wall becomes even thicker as the cells in it proliferate. This part of ripening process is fairly quick, but the third phase of the ripening is more elaborate: the cells that store the nutrition in the fruit expand into very big cells while they collect more and more water and nutrition that is provided from the plant (and before that, from the soil). At this point several defense mechanisms also develop, that is the production of non-tasty compounds that we perceive as astringent, bitter, or sour. Some of the defense might also include toxic substances. These are all necessary to repel any intruders and eaters as long as the fruit seeds are not competent enough to grow on their own.
At the end of the ripening process is the ripening itself, that is the relatively short period of time wherein the fruit is meant to be eaten, and after which it dies (if it's not eaten that is). This is the time when the fruit becomes sweet, due to the increased amount of sugars, while at the same time it also becomes less taste-repulsive. It also changes its color, from green to an eye-catching red or yellow, in most cases. The fruit also becomes softer. In short, it becomes edible and tasty when it is ripened. All these changes are triggered by a simple molecule called ethylene (chemical formula is C2H4, where the carbons are double-bonded). This little molecule creates so much action, it's amazing. Ethylene is also volatile, which certainly promotes its fast distribution throughout the fruit, which is why the fruit ripens so quickly. Ethylene is also quite smelly, and it is probably most noticable in bananas, especially the bananas with several black spots on the skin. It smells similar to a common gas used in stoves, and you surely recognize the smell in your mind now if you didn't know about it before. Since this ethylene gas is so volatile, it can be used to actually artificially ripen the non-mature fruits by simply exposing the fruits with this gas. And you can quicken the ripening of unripened fruits in you own home by, for example, placing them near your bananas! It's all biochemistry. Of course, you should be careful with vegetables and fruits that should not be exposed to ethylene as they could become destroyed, e.g. potatoes that respond to high ethylene concentrations with sprouting. Also, fruits and veggies that are already mature should not be placed close to ethylene-packed fruits.
One last thing about fruit ripening is concerning the accumulation of sugar during the ripening process. Some fruits are dependent and some are not dependent on connection to the plant in order to become sweet. The fruits that can be picked before maturation include bananas, kiwis, avocados, tomatoes, and pears. However, citrus fruits, berries, pineapples, melons - should NOT be picked from the plant until they are ripened. If they are, they will not be as sweet as they can be. They may be quite sour, acidic, or bitter, and not sweet at all if they are harvested too early. But the best thing is of course to harvest all the fruits from the plant when they are ripe. Fruit ripening is a process that should be used to our advantage and should not be trifled with.