Actually you have it backwards. Melanin is considered extremely important by the body, some people have high latent melanin levels but all people regardless of race are able to darken their skin color via tanning (exposure to the sun triggering melanin release). Darker skin protects you from being sun burned, which is harmful and can even be fatal (leading to heat exhaustion, heat stroke, etc.) The body considers melanin production so important that some of the natural checks and balances against cancer are inhibited in melanin generation cells, which is why skin cancer is fairly common compared to other types of cancer.
Quite. Folks with the recessive MC1R gene for red hair, like myself, are at much higher risk for skin cancer since we don't really tan, only freckle. Interestingly, this gene is also linked to a vitamin K deficiency, lower tolerance for thermal pain and has implications for anaesthesia and post-operative pain management.
Inexplicably it also correlates with a higher tolerance for electrical pain, which might be a useful adaptation for hackers :)
I don't know where I heard or read this, wearing sunglasses tricks your body into thinking it is dark (no surprise).
In response to that, your thymus (?) which is influenced by light levels now diminished because you covered your eyes with dark glass, releases less melanin which makes your skin more susceptible to UV light. It's weird, your skin is more likely to burn because you are wearing sunglasses.
I believe it was CBC Radio quirks and Quarks where I heard it.
Also, (I mentioned over at Reddit) another interesting thing is the ability of the majority (95%) of adult northern Europeans to be able to digest milk. the next closest group are people from India where 50% of adults are able to digest milk.
"Melanin helps protect the skin against effects of the sun such as skin cancers and premature aging. In African American skin, melanin provides a sun protection factor (SPF) approximately equivalent to 13.4, compared to 3.4 in white skin. This discrepancy illustrates why skin cancer is more prevalent in Caucasian people"
I said specifically skin cancer. Naturally there's a balance between getting vitamin D and avoiding harmful UV. So the best skin tone to have differs in different environments (hence the gradual cline in skin tones over the world).
I don't have details at hand to cite, but I recall encountering some recent news of research that may place in question equating a simple measure of sun exposure to elevated risk for skin cancer. (I didn't look at in depth, and my memory could be somewhat faulty.)
It may not be simple quantity of exposure, but rather severe sunburns that most elevate risk. If one is outside regularly and acclimatized, these severe burns are less likely to occur.
Perhaps someone else will have a more detailed comment on this.
Of course, one's pigmentation will also influence the likelihood of sunburn, although dark pigmentation does not entirely prevent burning.
EDIT: Just read InclinedPlane's comment, above, which mentions the same concern with sunburn.
[Edit: I took you to mean that pigment was generally not beneficial, but probably you meant only in certain environments, which would be fair enough.]