http://www.ncbi.nlm.nih.gov/pubmed/7790106
"Worldwide, the greatest rise in melanoma has been experienced in countries where chemical sunscreens have been heavily promoted The rise in melanoma has been exceptionally high in Queensland, Australia where the medical industry has vigorously promoted the use of sunscreens. Queensland now has more incidences of melanoma per capita than any other place on Earth.
(Garland, Cedric F., et al. Could sunscreens increase melanoma risk? American Journal of Public Health, Vol. 82, No. 4, April 1992, pp. 614-15)."
"...our results support the hypothesis that sunscreens do not protect against melanoma, probably because of their ability to delay or avoid sunburn episodes, which may allow prolonged exposure to unfiltered ultraviolet radiation."
So yes UV causes skin cancer but the use of sunscreen can contribute to the risk.