Tanning is the body's natural defense against UV Damage
While sun exposure is important to our health and well-being, too much of a good thing can be damaging to our skin, causing a sunburn. For this reason, human skin tans to protect us from overexposure, and over many generations has even developed into several distinct skin types in response to environmental conditions.
Skin has three main layers, and the top layer, the epidermis, is the layer that produces a tan. Cells in the germinative (living) layer of the epidermis are constantly reproducing and pushing older cells upward through the horny (dead) layer - the part of your skin that you can see. Lying at the base of the germinative layer, and making up 5% of the cells in the epidermis, are melanocytes: pigment cells in the that help the skin tan. They use an amino acid called tyrosine to produce brown granules called melanosomes. These melanosomes contain melanin, a protein pigment which specifically protects skin from overexposure to UV light. Melanocytes will release more of these melanosomes whenever UV light touches them, making the skin darker (tan).
UVA and UVB work together to produce a tan. UVB is the primary stimulator for the production of melanin, and UVA darkens the melanin once it has been produced. Too much of either wavelength can lead to overexposure, and too little makes it difficult to achieve a tan effectively. The proper combination of UVA and UVB is what separates indoor tanning from outdoor, and a major factor in minimizing the risk of overexposure.