Wow, I'd probably never have seen this thread if it wasn't for the above post. Most of the pertinent stuff looks like it's been said but I'd just like to reference Richard Dawkins for a moment. In The Blind Watchmaker he points out that fireflies use bioluminescence to attract mates rather than as a light source for hunting as the light is easy to see but hard to see by as it would have to cast many more photons onto its surroundings to illuminate them than to illuminate a portion of itself. In the same way a lighthouse is easy to see but doesn't help you see anything except itself. Dawkins mentions an early German scientific notion that you could run lighthouses on firefly extract of some variety (much pumping of fluid would be required but I guess theoretically...)! I suspect that all bioluminescence generated by preditors is by way of a lure mimicking the sexual bioluminescence of other species and it doesn't aid their vision much. There are however other functions that haven't been mentioned as far as I can tell - first there's bioluminescence as an aposematic deterrant i.e. a warning of unpalatability.
That's where bioluminescence can provide a chameleonesque disguise. Nearly all krill, the tiny crustaceans that are food for everything from small fish to massive baleen whales, have eyelike structures called photophores on their undersides. The photophores give off light of similar color and intensity to that shining down from above, making the krill semi-invisible from below.
And now, by an odd co-incidence and courtesy of last nights XL, we have the news that humans exhibit bioluminescence too!
Although it has been known for many years that all living creatures produce a small amount of light as a result of chemical reactions within their cells, this is the first time light produced by humans has been captured on camera.