There are certain physiological mechanisms or body processes that we have acquired thanks to the lifestyles our very, very distant ancestors. For example, the colouring of our skin is a process that is dictated by the amount of melanin that is released and by the number of melanocytes (melanin producing cells) found near the surface of our skin. The process of producing melanin evolved over the millenia in response to exposure to sunlight. Today, we have strong evidence to demonstrate that humans began their journey some 60,000 years ago out of Sub-Saharan Africa region. This is a tropical region that is hot and very sunny. As humans began to shed body hair due to warm climates, our skin became exposed to sunlight.
There are some individuals who develop premature skin damage and a certain proportion develop lesions and melanomas due to damage to the DNA within skin cells. When UV light damages DNA, many vital cellular processes (e.g. making of critically important proteins and enzymes) go awry and cells lose their capacity to function and replicate normally. Depending on the nature and severity of the damage, skin lesions can be pre-cancerous or become cancerous. Those of us with light skin tend to have lineage from regions further from the equator, where the response to sunlight has deminished through the generations.