Why is a gene for a fluorescent protein used rather than one for an enzyme that produces fluorescent molecule?
GFP has a lot of advantages:


The detection of the fluorescence works directly and doesn't need a lysis step or the uptake of a reagent.
Fluorescence can be detected directly using a fluorescence or confokal microscope with the cells. This can be done while growing them on plates (works for bacteria and eukaryotic cell culture).
You can sort labelled cells using a flow cytometer.
direct tagging of proteins and their subsequent localisation on the cell is possible.
GFP is rather stable in the cells and not toxic.