Basically, if the sun (or a strong source of light) is anywhere in front of you, a lens hood can help to prevent flare caused by unwanted light entering the lens.
With very wide angle lenses this can be a little tricky, as the field of view means that the hood can only be a few short petals. Hoods are more effective with longer focal length lenses.
They also act as protection to the lens - although some manufacturers charge silly prices for lens hoods, they're still cheaper to replace than a lens if they get a knock.