Energy for the light can cause skin cancer and damage genetic materials (melanocytes) however melanin absorbs the light meaning the genetic material in their skin cells are protected from any damage so in conclusion the more melanin in the cells the more their cells are protected