My advise is to always use a lens hood when photographing. Most lenses come with a lens hood, but if yours doesn't (I know some of the cheaper Canon lenses don't come with a hood), buy one. They are usually not too expensive and they will certainly improve your photography.
Here are three good reasons for using a lens hood on your lens:
- Contrast improvement – The lens hood will keep out stray light from entering the lens. Stray light that isn't part of the scene, but which does remove some of the contrast. You can visualise this easily yourself: look at a scene without your eyes shielded and than look at the same scene and shield your eyes by holding your flat hand above your eyes. You’ll notice the difference in contrast immediately. The brighter and the more “into the light,” the more dramatic the increase of contrast.
Note that while e.g., inside or in a studio there is probably less “stray light,” my advise is to also always use a hood there too, just in case.
- Less chance of lens flare – By keeping out the stray light, you will also lower the chances of flare. This is also easily visible.
- Lens protection – A lens hood also offers very good lens protection, way better even than any protective filter will (for even more protection, you can also mount the lens cap, of course).