First, this information is provided by my friend Alex Fullerton, a winemaker:
Anthocyanins (the main pigment in red wine, red cabbage, blueberries, and many other things) are responsible for both the blue color in the grapes' skins and the purple color of the wine. Anthocyanins have a double bond that is formed at one of two different locations of the molecule depending on which location is more favorable, resulting in the molecule having two very different shapes it can take. In high pH it is more favorable for most of the molecules to twist one way resulting in blue hues, while in low pH it is more favorable for most of the molecules to twist the other way resulting in red/pink hues.
The skins on the Monastrell grape, for example, are alkaline, resulting in a blue color while the wine is more acidic (but not extremely acidic, maybe around pH 3.8) causing a purple color (roughly half of the pigment is blue and the other half is red, red + blue = purple). A very acidic Burgundy, on the other hand, with a pH under 3.5 will appear very red.
And, from Wiki:
Anthocyanins (from the Greek words for "flower" and "blue") can appear red, purple, or blue, depending upon the pH. In flowers and fruits, anthocyanins make the color red, blue, or purple, in order to attract pollinating insects (in the case of flowers) or predators (in the case of fruits, which need predators to eat and then disperse the seeds in the fruit).
During maturation, the wine is exposed to air. Oxygen (from air) plays an important role in the condensation reaction between anthocyanins and tannins, which results in the gradual loss of free anthocyanins and the formation of stable polymeric (anthocyanin tannin) pigments. It has been observed that the poiymeric pigments account for 50% of the color density in one-year-old wine. As the wine matures and more polymeric pigments are formed, the color shifts from red to orange and brick red.