Cause of skin cancer: The sun or sunscreen?

It wouldn’t make sense, that the sun, the source of our energy, would give us cancer. Melanoma.org states the following: Melanoma is the deadliest form of skin cancer. Research suggests that nearly 90% of melanomas are caused by overexposure to ultraviolet (UV) radiation, either from natural or artificial sources. … Using sunscreen increases your risk of getting melanoma.Sunscreen is unsafe and causes cancer. Is there truth to that, or are we just dealing with claim vs. claim?