This is because some chemicals are photosensitive meaning that they break down when exposed to light. A good example of this is Hydrogen Peroxide (H3O). Because the bonds are unstable due to the fact that oxygen can only bond with two other electrons when each of the Hydrogens each have one electron. Therefore the energy of the light (photons) is great enough to break it up into water and Hydrogen gas.