A long time ago, people lived in different parts of the world, and their skin color helped them survive in their environments. In very sunny places, like parts of Africa, having dark skin was an advantage because it protected them from harmful UV rays from the sun. This meant they had a lower risk of getting sunburn or skin cancer, which helped them live longer and have children.
On the other hand, in places with less sunlight, like northern Europe, people had lighter skin because it helped them absorb more sunlight. This was important for making vitamin D, which is needed for strong bones and overall health.
So, depending on where people lived, having dark or light skin helped them survive better and have more children, which is why different skin colors developed in different places around the world!