From Babak Givi, an assistant professor at NYU's Dept. of Otolaryngology-Head & Neck Surgery:
I am writing in regards to your January 9th podcast ["Are We Ready to Legalize Drugs? And Other FREAK-quently Asked Questions"] and the question about hats. Why people used to wear hats? Stephen made a comment about religious roots of hats and Steven talked about fashion.
I am sure there are links with both, but I would like to note that for the most of the human history, hats were protective garments. We are not spending as much time as we used to out in the open environment. If you spend most of the time outside, you will soon realize that similar to the rest of your body, you have to protect your head from the sun, wind, rain, or snow; but most importantly from the sun. Even now, when we spend most of our time inside our manmade structures, skin cancers are the most common type of cancer in humans. Furthermore, the most common area for developing skin cancers is head and neck, which happens to be the most exposed area of human body, as long as you are not a strict nudist. The effects of ultraviolet rays on developing skin cancers is beyond doubt. Lightly pigmented skins are extremely sensitive to the sun and with enough exposure most people will develop skin cancers. Hats, similar to the rest of clothing items, protect our skin. In addition, less sunlight will delay development and progression of cataracts (point for wide brim hats). I think our ancestors had developed the habit of wearing hats out of necessity not fashion or religion. But of course through the millennia, we start adding religious, fashion, and symbolic meanings to wearing hats.