What happens when silver chloride is exposed to sunlight

When silver chloride is exposed to light, it decomposes to form silver metal and chlorine gas. This reaction is used in black and white photography.

2AgCl → 2Ag + Cl2