there are some other suggestions. the red colour of leaves may camouflage leaves from herbivores blind to red wavelengths. the pigment may signal bad taste, since anthocyanin synthesis often comes with unpalatable phenolic compounds.