Is this an external diode? Or are you referring to the diode that's on the mosfet schematic symbol? The one on the symbol is inherent to the design of the mosfet - it's formed by the stackup of p and n type materials in the mosfet.
If you're talking about an zener added to the design, then that is, as del said, to protect the mosfet from switching transients. Is this mosfet driving a relay, motor, or other inductive load? That's the most typical time to use a protective diode.