To the contrary, there appears to be evidence that they may cause melanomas.
More evidence is mounting and here are a few excerpts.
But when people hear the term skin cancer, they think melanoma. That's because when sunscreen labels claim that the product can protect people from skin cancer, consumers don't differentiate melanoma from basal cell and squamous cell skin cancers. Until around 1950, melanoma was rare. The standard, pro-sunscreen explanation is that, like lung cancer, the disease has a long lag time, on the order of 20 years. Americans began sunbathing in earnest in the 1950s, and as a result, the melanoma epidemic hit in the 1970s.