It sounds obvious that dive hoods are designed to keep you warm, but the extent to which they do may surprise you. If you were wore a full exposure suit, either a wet suit or a dry suit, but did not cover your head, you would still lose approximately 75% of your body heat through your head.
Like wet suits, scuba diving hoods are made of neoprene which contains tiny nitrogen bubbles inside the material. These bubbles form an insulating barrier between your head and the water, proving excellent thermal protection. A thin layer of water will enter between your hood and your head at the beginning of your dive, which is quickly warmed to your body temperature. Just like a wetsuit too, they are available in a variety of thicknesses to suit the dive conditions, namely the temperature you plan to use them in.
It is definitely more of an optional item in warmer water, but you will need a dive hood as a matter of necessity if you plan to dive in temperatures lower than 21 degrees Celsius.
Hoods not only provide thermal insulation, but some abrasion protection as well, meaning you won't suffer serious injury if you should lightly graze or bang your head accidentally.
Bibbed hoods flare into a broad flange or "bib" which you tuck into the neck seal of your exposure suit. Some feature a smaller neck band as pictured here. In wet suits, the bib or neck collar creates a snug fit between the suit and your skin to minimize water circulation and ensure you do not lose crucial body heat. There may be a special collar on a dry suit to accommodate for dive hoods.