There is an enzyme in the gills of the Jack-O-Lantern mushrooms referred to as "Luciferase" which gives it bioluminescence.
Last year, I found one in the woods and was unsuccessful at capturing the glow even with infrared. If you let your eyes adjust to the dark you can see a very dim glow. I noticed it this week and decided to take another shot at it and it worked.