In my opinion, this is connected to the way that power and wealth has been distributed in the world over the last few centuries. In general, the people of the world who have the lighter skins have been richer and more powerful than those who have darker skins. This has been happening since at least 1500, I would say.
If you think about the last 500 years, you will see that the Europeans and Americans (who came from Europe anyway) have dominated the world. In my opinion, people like to copy those who are successful and they think that the attributes of successful people are better than those of less successful people. That is why many people prefer light skinned people to dark skinned people.