Actually, the ingredients in most sunscreens are quite deadly to corals. I happen to be privy to all of the testing Mote has done on many of the sunscreens out there. 2 types of tests are performed, one for mortality to live corals and another that tests sunscreen on any changes to the viability of coral gametes. Of course, coral spawns once or twice a year for 3 or 4 days, so a sunscreen that isn't toxic to gametes is a good thing, and very effective for 8 days a year. The second test is the toxicity to live coral that is already colonized. Sunscreen that contains oxybenzone, for example, can lead directly to coral bleaching and then disease. The 2 tricks are, don't let the sunscreen wash off, and don't touch the reef. Most waterproof sunscreens don't wash off, and we are trained from wee ocean divers not to touch the reef. After all, it's icky.
There are some sunscreens out there that pass both the coral gamete mortality test as well as the coral mortality test. But any good waterproof sunscreen should be good for being healthy for the reef. I know personally of one such test that tested the viability of sunscreen on coral gametes. One of the reef safe sunscreens had no impact on gamete mortality at all. One killed the gametes like it was it's job, and the control for the test was No-Ad, the industrial waterproof sunscreen you buy in bulk at Walgreens and Costco. The No-ad fared far better in the test than did one of the so called reef safe products.