Protection: Coral pigments may change damaging UV light into a frequency that's less damaging to their algae, a color-changing sunscreen that turns UV into green. This idea is interesting since fluorescent corals are in more common in shallows, and less so under dark overhangs even at a shallow depth.
Photosynthesis: There is evidence some corals survive at far greater depths than physics would allow useful light to penetrate. The entire phenomenon of coral fluorescence was only seriously investigated after deep divers witnessed red corals at a depth far beyond red penetration. Only shorter UV wavelengths can penetrate to this depth and there is a possibility the fluorescent proteins change UV light into a more desirable light for algae growth.
Many other animals besides coral polyps fluoresce for some reason. Some researchers believe this is used for mate attracting or threat displays. I'm not convinced. I believe they are using it to hunt.
My thoughts about why marine animals fluoresce...
Bio Attractant: Here in Thailand moray eels glow bright lemon yellow illuminating their nook brightly; crabs fluoresce such bright orange they are visible through sand as they wait for prey; sole sport pink spots with glowing rings around their eyes to attract fish, scorpionfish also have glowing eye rings.
The list goes on and the evidence is clear these fish are using fluorescence to hunt. Why not the corals as well ? Coral polyps are mellow farmers in the day but turn into very effective predators of plankton at night.
Mushroom coral with tentacles extended at night. I have a video link on this page that shows this mushroom nearly catching a copepod, escaping only because it had a shell.
Large numerous polyps extending from corals normally smooth in the daytime.
Anemone glowing brightly. I have a video link on this page showing this anemone catching a juvenile squid. At first attracted to my bright light, it turned away from the intensity to swim directly into this anemone, perhaps a hundred body lengths away.
Very interesting as well is the Anemone Fishes tendency to try and eat the polyp once it's caught ! I've seen this behavior many times and the anemone fights back by clasping the catch very aggressively. This is quite clear in the video at low center. Clearly successful hunting using fluorescence also helps feed host fishes.
Every evening if you watch closely there is a magical time at both sunset and sunrise when there is very little light in the sky, but there is enough light to see. Blue light. Fluorescence Inducing Light twice a day (to witness this yourself visit the science section). As well many days per year the moon shines very brightly from directly overhead in the tropics, adding considerable bluish light to the shallow corals.
I propose animals use fluorescence to take advantage of short but regular fluorescent periods to augment their total feeding budget, if not largely fill it. What do you think ? The research is so new you as a fluorodiver can actually discover your own clues to this scientific mystery !