Multitude of factors:
1. I think it is to do with a long history of colonialism. From the Mughals to Britishers. In both the cases the ruling class were of a different skin shade than the average Indians toiling everywhere.
2. Coupled with the fact that since we live in a tropical region, for thousands of years the poor people did manual jobs out in the sun while the rich did not...consequently forming a glaring difference in skin colour, so the the being of lighter shade started getting associated with being rich and therefore a desirable trait while being darker implied the opposite.
3. Being 'different' is good. Same reason why Caucasians get a tan, so that they look different from the regular pale white average crowd.
Though I have to agree with some other posters here. There is a reason why Africans are looked down upon. Its because a large number of Nigerians are in India and are constantly involved in drug crimes, drug trafficking and other socially undesirable actions. Consequently the people have started associating presence of Africans as problem causing. Basically Nigerians have spoiled it for every African.