|Bundle up! From Prof. Shakhashiri at scifun.org.|
Basically, as fall approaches, deciduous trees begin to cut off the supply of nutrients in to the leaves, and the chlorophyll starts to fade away. The trees also recoup nutrients from the leaves, draining them of amino acids, potassium and magnesium.
As chlorophyll disappears, the color of the leaves starts to be influenced by other dye-like substances which vary from species to species. The beautiful reds of some maples, oak and sumac come from anthrocyanins, which absorb blue and blue-green light. (Anthrocyanins also contribute to the color of red apples.) These compounds are made in the leaves during the fall, and may help with protection against free radicals [pdf link] formed by the remaining chlorophyll when the trees are in bright sunlight.
The bright yellow seen in birch and hickory trees comes from carotenoids, which are "antenna pigments" and are present in these species throughout the year. Some recent research on Scandinavian birch has shown that the timing of t their fall colors is under natural selection through differential infestation with a parasitic aphid. These aphids prefer trees with bright yellow leaves in the late fall, possibly because the phloem sap becomes nutritionally richer as amino acids are withdrawn from the leaves back into the parent tree. So a tree whose leaves are yellowing in preparation for fall will attract more parasites. More parasites mean less amino acids available to the tree. Thus these trees under selective pressure to begin the color transition as late as possible in the season.