what does the skin produce in response to sunlight exposure
Sun tanning Moderate exposure to the sun contributes to the production of melanin and vitamin D by the body, but excessive exposure to ultraviolet rays has negative health effects, including sunburn and increased risk of skin cancer,[1] as well as depressed immune system function and accelerated aging of the skin. Some people tan or sunburn more easily than others. This may be the result of different skin types and natural skin color, and these may be a result of genetics.
Skin immunity Skin immunity is a property of skin that allows it to resist infections from pathogens. In addition to providing a passive physical barrier against infection, the skin also contains elements of the innate and adaptive immune systems which allows it to actively fight infections. Hence the skin provides defense in depth against will infection.