Do sunscreens actually prevent skin cancer and pre-cancerous skin lesions?
Yes. The most regarded randomised controlled trial on the subject is the Nambour study out of Queensland, Australia. The study followed 1600+ people from 1992 to 2006.
The reduction of squamous cell carcinoma (the second most common type of skin cancer) in the group that applied daily sunscreen was profound.
Invasive melanomas were substantially reduced in the sunscreen group while the thinnest melanomas (melanoma in-situ) showed a trend towards reducing.
No clear reduction in basal cell carcinoma was seen in this study. A possible explanation of this finding is that the time from sun exposure to basal cell carcinoma development is very long, and so it is very difficult to capture this effect in a study spanning even 5-8 years.
This study and three other randomised controlled trials confirm that the regular use of sunscreen reduces actinic keratoses (precancerous skin lesions that may progress to squamous cell carcinoma with time).
Source: Research Review Educational Series. An update on sunscreen IV. 2015