One of the main risk factors for skin cancer is severe sunburn. It is ultraviolet light (mainly UV-B) from the sun (or other sources like lights in tanning salons) that causes damage of DNA and thus skin cancer.
Damage of BRAF gene in skin cells may be responsible for developing melanoma type of skin cancer in human (according to finding of British Council of Cancer Research, published in Cancer Cell, Volume 15, Issue 4, 294-303, 7 April 2009.
The presence of damaged BRAF gene in melanoma has been already known, but it was now clearly identified as an actual cause of transformation of normal skin cell into a cancerous cell. Investigations were done on mice, but results can be used for explanation of development of melanoma in human.