The current theory on the reason for the bioluminescence (as far as I know), is to attract predators to eat it and spread all its spores around.
The enzyme that produces the glowing is called luciferase. More can be found about it on wiki:
Luciferase (Wiki)
A fantastic little mushroom!
If anyone is interested in glowing shrooms, you should also check out the other great Aussie: Mycena chlorophanos