Who knew that a simple trait like skin complexion could cause so much trouble for our species? While we are slowly but definitely moving towards a post-racial society, the symptoms of the systematic oppression and abuse of black people can still be felt. Across cultures lighter skinned people have generally enjoyed higher status and better opportunities compared to their darker counter parts. This inequality wouldn't have existed if black people didn't exist in the first place. So why do they even exist?
Before trying to find out why, let us establish that it is a valid question. Take a good look at this chimp and imagine what he would look like if we were to shave his body hair. Pay attention to his mouth and chest areas. That is right - chimps and most other primates when shaved would look more like Brad Pitt than Will Smith. They are all whites! If all of our evolutionary cousins are whites, why do black humans exist?
It all started millions of years ago when humans started losing body hair. You can read theories here on why only humans lost their body hair but not thousands of other mammals.
Harmful effects of UV radiation:
While there are several benefits to losing body hair, one obvious drawback is increased exposure to harmful Ultra Violet radiation from the Sun, especially while walking naked in the hot African Savannah like our early ancestors did. UV radiation can destroy a molecule called Folate in our body, the deficiency of which can cause birth defects. It can also significantly increase the likelihood of developing skin cancer. It has been found that not only does skin cancer kill people but it kills them at a very young age severely cutting into a person's reproductive years (a study found that Albino Africans who develop skin cancer usually die in their 30s. If skin cancer can kill people in their 30s today, it is reasonable to assume that it killed our ancestors at a much younger age).
Dark skin protects against UV radiation:
Turns out that dark skin protects both from skin cancer and Folate damage (how exactly dark skin fights UV light is beyond the scope of this article). In fact, researchers found that African Americans are 1/50th as likely as White Americans to be diagnosed with skin cancer. Since dark pigmentation offered better protection against skin cancers and Folate damage, people with darker skin lived longer and had a better chance at reproduction and were able to pass on their genes which gradually led the population to grow darker. On the other hand people with pale skin died before getting a chance to reproduce and thus gradually got weeded out of the population.
Why do white people exist then?
About 120K to 60K years ago, dark skinned humans started migrating out of the tropics towards poles with low UV radiation. When this happened dark skin's protection against UV light no longer offered an evolutionary advantage. Instead, pale skin became more advantageous because it was better at absorbing sunlight which the body needs to make Vitamin-D. (the reason why darker people in colder climates are often prescribed Vitamin-D supplements).
To summarize, humans evolved dark skin because it offered protection against UV light and thus is prevalent in hotter climates like Africa. Pale skin bounced back when humans migrated out of Africa because it protects against Vitamin-D deficiency in colder climates like Europe.