Dyes and pigments work by absorbing certain wavelengths of light and reflecting or transmitting the rest. When a dye molecule absorbs a photon, an electron is excited to a higher energy state. Most of the time (neglecting fluorescence), the molecule de-excites by giving off heat and returns to the ground state intact. However, because the excited state is a high energy state, it has the potential to undergo a chemical reaction, breaking a covalent bond or otherwise irreversibly reacting with another molecule. This changes the electronic structure of the molecule which changes its absorption properties: e.g. many dyes that absorb visible light have large systems of conjugated double bonds and if these are broken, the absorbance can shift to much shorter wavelengths. How likely this kind of destructive chemistry is depends on the nature of the dye. Organic dyes tend to be more susceptible to photobleaching than things like quantum dots and inorganic pigments.
Touching on Nicolau's comment, red paint can often degrade faster because it absorbs higher energy (shorter wavelength) light. The more energy that is available, the more likely it is that reactions will occur. This is more pronounced as we enter UV wavelengths, which is why UV-B can cause thymine dimers in DNA, which can lead to skin cancer. For outdoor signs and such, UV-blocking coatings are often applied to extend the life of the dyes.
It's also not necessary for the light to interact directly with the dye molecules to cause bleaching: depending on what other molecules are present with the dye (solvents, etc), these other molecules may produce reactive species that then react with the dye.