This is another one of those creation-related questions that starts with a false assumption. In this case, the assumption is there are different human races. But there is actually only one. Genetically speaking, all of humanity is one race. A race is a biological subspecies which has genetically transmittable anatomical traits that distinguish it from other races. Thanks to genetic research, we now know that humans across the globe are 99.8% genetically identical. Most of differing 0.2% has to do with gender and personalities. Physical differences involve only 0.012% of a person's genes. Even with the variations in skin color and facial features, humans have only one race.
What is the origin of the races of humanity?
People from different geographical areas do tend to have similar features. One of the most common hypotheses is that when God confused the languages at the Tower of Babel (Genesis 11:1-9), He changed the features of the different language groups to match their new geographical homes. Darker skin protects against skin cancer in particularly sunny areas, lighter skin absorbs more vitamin D from the weak sun of northern climates, etc.
It's more likely that Adam and Eve had the genetic potential to produce a variety of skin tones and features. Noah and his family apparently passed this along. At the Tower of Babel, God separated people into languages and nations (Genesis 10:32). As people with the same language drew away into relative isolation, recessive genes would have been reinforced within the particular populations. Features would have grown more exaggerated until specific characteristics became easily identifiable.
Whatever the cause, it is important to remember that God makes absolutely no distinction based on skin color or physical features (Galatians 3:28; Colossians 3:11; Romans 10:12-13). God Himself told Samuel, "For the Lord sees not as man sees: man looks on the outward appearance, but the Lord looks on the heart" (1 Samuel 16:7).
What is a biblical view of prejudice, descrimination, and racism?
Does the Bible say anything about interracial marriage?
What does it mean that humanity is created in the image of God?
Why did God create humanity?
Where did Cain's wife come from? Who was she?
Truth about Humanity