The present invention relates to a composition containing a sunscreen agent capable of undergoing protonation or deprotonation to form a protonated or deprotonated, respectively, sunscreen agent which absorbs, scatters or reflects more or less UV radiation than it does before being protonated or deprotonated, respectively, and a photoresponsive acid or base generating system which is capable of protonating or deprotonating, respectively, said sunscreen agent when the composition is exposed to UV radiation. Further subject matter of the present invention is a microcapsule comprising a sunscreen agent capable of undergoing protonation or deprotonation to form a protonated or deprotonated, respectively, sunscreen agent which absorbs, scatters or reflects more or less UV radiation than said sunscreen agent does before being protonated or deprotonated, respectively, wherein said sunscreen agent is present in said microcapsule substantially in its protonated or deprotonated form that absorbs, scatters or reflects less UV radiation than said sunscreen agent does upon protonation or deprotonation, respectively. The composition and microcapsule according to the invention are particularly useful for providing sunscreen formulations for cosmetic applications and for providing dermatological formulations for medical applications.