Why and how does hydrogen peroxide decompose in the presence of light?
Chemical reactions in which, a single substance splits up into two or more simpler substances are called decomposition reactions. These reactions are carried out by energy, supplied by different sources. The required energy can be supplied by heat (thermolysis), electricity (electrolysis), or light (photolysis). 

Let’s talk about photolysis reactions (not photosynthesis): 


  Photolysis (also called photodissociation and photodecomposition) is a chemical reaction, in which a chemical (an inorganic or an organic) is broken down by photons and is the interaction of one or more photons with one target molecule. The photolysis reaction is not limited to the effects of visible light, but any photon with sufficient energy (higher than dissociation energy of the targeted bond) can cause the chemical transformation of the said (inorganic or organic) bond(s) of a chemical. Since the energy of a photon is inversely proportional to the wavelength, electromagnetic waves with the energy of visible light or higher, such as ultraviolet light, X-rays, and $\gamma$-rays, can also initiate photolysis reactions.


Like all other peroxides, hydrogen peroxide ($\ce{H2O2}$) also consists of a relatively weaker $\ce{O-O}$ bond, which is susceptible for light or heat. In the presence of light (the UV light from the sun catalyzes the reaction), $\ce{H2O2}$ spontaneously decomposes into water and oxygen.

The net equation for the reaction is:
$$\ce{ 2H2O2 -&gt; 2H2O + O2}$$

The step-wise reaction mechanism is suggested as follows (Ref.1):

$$\ce{ H2O2 + h\nu -&gt; 2 HO^.}$$
$$\ce{ HO^. + H2O2 -&gt; HO-O^. + H2O}$$
$$\ce{ HO-O^. + H2O2 -&gt; 2 HO^. + H2O + O2}$$

Using isotope studies ($\ce{^{18}O}$ labelled $\ce{H2O2}$), early work has been confirmed that the $\ce{O2}$ formed is cleanly derived from $\ce{H2O2}$ (Ref.2).

Notes: The rate increases rapidly in the presence of catalysts such as $\ce{MnO2}$ and $\ce{KI}$ (Ref.2). The rate of decomposition is slow at room temperature, but it increases with temperature. It is believed to be due to thermal decomposition of $\ce{H2O2}$, which seemingly accelerates the photolysis (Ref.3).



References:


J. P. Hunt, H. Taube, “The Photochemical Decomposition of Hydrogen Peroxide. Quantum Yields, Tracer and Fractionation Effects,” J. Am. Chem. Soc. 1952, 74(23), 5999–6002 (https://doi.org/10.1021/ja01143a052).
A. E. Cahill, H. Taube, “The Use of Heavy Oxygen in the Study of Reactions of Hydrogen Peroxide,” J. Am. Chem. Soc. 1952, 74(9), 2312–2318 (https://doi.org/10.1021/ja01129a042).
F. O. Rice, M. L. Kilpatrick, “The Photochemical Decomposition of Hydrogen Peroxide Solutions,” J. Phys. Chem. 1927, 31(10), 1507–1510 (https://doi.org/10.1021/j150280a004).