Not necessarily. Evolution also works by the elimination from the gene pool of genetic traits that are unsuited to the prevailing environment. Consequently, those without the genes for high skin melatonin will be disadvantaged in a high-sun environment so, in nature, they would tend to die out, leaving only those with darker skins. They would not change in response to a dramatic change in environment, they would die out.
In reality, man made environments are unnatural so white skinned people have artificial protection from the sun and would not necessarily be greatly disadvantaged. Humans can now survive conditions, medical and environmental, that would have killed them in the past but that is because of technology rather than the evolution (unless you count the evolution of the brain that gives us the capacity to invent and discover).
Evolution tends to be a long-term process, responding to microscopic changes in environment over many years. A mutation that gives an advantage will tend to survive while a mutation that is a disadvantage will not. The sudden introduction of a non-adapted species to a hostile environment will weed out those less well able to tolerate the new environment. Any survivors with more favourable genes will reproduce with others similarly equipped so, over time, a better adapted life form may evolve.