Exactly, go back far enought and we are all black. 
No, we were all apes yes but we never were the same as the africans/asians you see today, we branched off and evolved completly separately, i don't think we need to discuss who evolved better, history has enough evidence to prove it's the european subgroups. But of course there are some exceptions to every rule.
Once tribes were formed they moved to their own corner of the world and reproduced only with people from within the same tribe as them, eventually certain traits became unique to the seperate tribes which eventually became nations and this is why we are so different today. Obviously the environment played a small role aswell. But it's not just our skin color that makes us different, our average skull/facial features are all different from other races. Example would be that "Indians and "Arabs" tend to have very small foreheads, but central/northern europeans generally have longer foreheads, this is nothing to do with the "sunlight" it is natural selection.