Compounds like Silver Chloride are light-sensitive and they may react to light very fast and lose their properties. That's why they are to be stored in dark bottles to prevent the entry of light.
AgCl is converted to molecular Ag atoms by the effect of photons of light.