Very simply, sunburn and UV light can damage your skin, and this damage can lead to skin cancer. There are of course other determining factors, including your heredity and the environment you live in. However, both the total amount of sun received over the years, and overexposure resulting in sunburn can cause skin cancer. Tanning is your skin's response to UV light. It is a protective reaction to prevent further injury to your skin from the sun. However, it does not prevent skin cancer.