Vitamin D is possibly one of the most under-rated nutrients humans need. An inadequate supply will predispose someone to a variety of diseases. Being able to synthesize enough will have an effect on the ability to survive. Lighter complexion is a way of producing more Vitamin D at higher latitudes.
A fair complexion has no effect on skin cancer, this is in fact one of the biggest red herrings of modern medicine. Malignant melanoma is a genetic defect passed on through families. The appearence of skin cancer at any rate occurs too late in a life history to have any effect on evolution.
The driving force for selection of darker skin is the protection of folate against the suns rays, the ability to preserve folate has an imediate effect on reproduction since folate protects against neural tube defects in fetuses. Hence selection for dark complection will occur in a few generations of a population.