There are some good answers here, but to distill and maybe enhance:
Beer heads are a great indication of proper serving because if any number of factors that could affect the taste are off, they'll also affect the head. Some of these are:
- Warm beer foams too much. If your server is dumping tons of head down the drain to fill your glass with enough beer, it might be too warm.
- Too much pressure in the keg makes beer foam too much. The brewer carbonated it to the level they wanted, the bar might be over-carbonating it.
- Cold beer does not foam very much. If the kegs are chilled too cold or the bar is serving beer in a frozen glass, your beer is probably too cold. Cold temperatures will dull flavors and kill aromas. Obviously if you're into beer for flavor, this is bad.
- Dirty glasses tend to dissipate the foam very quickly, so you could be drinking whatever was in the glass before, or soap scum... neither of which sounds very tasty.
- Under-carbonated beer doesn't foam very much. Under-carbonation can also dull flavors since so much of taste is based on smell and you can't smell volatile aromatics if there's no fizz to carry them out of the liquid.
There are various schools of thought on the head as an indicator of beer's quality or freshness but realistically this will vary by style. Think of the thick creamy head of Guinness stout; remove the head and you completely change the experience. The large luxurious heads of Belgian beers, or the thinner off-color head of porters.
Also, without a good head with lots of tiny popping bubbles of CO2 to spray the air above the glass with volatile aromatic oils, you wouldn't have nearly as much hoppiness to smell and taste in an IPA or spices from a Belgian style.