The Environmental Working Group rates 786 varieties of sunscreen available in the U.S., based on both effectiveness and potential health hazards. It concludes that "only 17% of the products on the market are both safe and effective, blocking both UVA and UVB radiation, remaining stable in sunlight, and containing few if any ingredients with significant known or suspected health hazards." The EWG provides separate ratings for effectiveness and safety, so if you're not worried about, say, possible allergic reactions to the fragrance in L'Occitane Immortelle Very Precious Fluid (SPF 40)—which rates a 7 on the "health hazard" scale but a 0 on the "sun hazard" scale (meaning it's highly effective)—you can still see how well the product blocks ultraviolet light.
Interestingly, despite its extra-cautious attitude regarding unconfirmed hazards, the EWG faults the Food and Drug Administration for preventing the U.S. sale of sunscreens that have long been available in Europe. Some of these products are especially effective at screening out UVA light, which does not cause sunburn but may pose a more serious skin cancer risk than UVB light does. The EWG prefers them to similarly effective FDA-approved alternatives that contain nano-particles, which it says "raise potential concerns":
Micronized and nano-scale zinc oxide and titanium dioxide in sunscreen provide strong UVA protection, and are contained in many of our top-rated products. Repeated studies have found that these ingredients do not penetrate healthy skin, indicating that consumers' exposures would be minimal. Studies on other nano-scale materials have raised concerns about their unique, toxic properties. FDA has failed to approve effective UVA filters available in Europe that, if approved here, could replace nano-scale ingredients.
At the same time, the EWG criticizes the FDA for allowing sunscreen manufacturers to make misleading claims such as "blocks all harmful rays," "waterproof," and "all day protection." The agency has been dragging its feet on sunscreen safety standards for decades. Meanwhile, the misleading claims have prompted class action lawsuits in California. Although I don't know the details, in principle this seems like an appropriate response: Companies should be held liable for selling products under false pretenses, but in this case the loss to any one consumer is too small to make individual suits cost-effective. While the FDA dithers, the threat of civil judgments and the educational efforts of independent groups such as the EWG can help protect consumers from fraud and steer them toward the best products.