The sun's most harmful rays are UV - ultraviolet - radiation. Though they are too high in frequency for us to see, that they are still hitting you is why you can still get burned on a day when the sun is not shining brightly. In Australia, which has "one of the world's highest incidences of UVR-related conditions and illnesses", like skin cancer and melanoma, researchers did a study to examine the truth of that hair-protection business.
As Marc Abraham of Improbable Research notes in The Guardian, Dr Alfio V Parisi and colleagues put beards and mustaches on mannequins and put them out in the Australian sun. The mannequins with a long beard, a short beard with just some facial hair showed some changes UV dosimeter readings but not enough to afford long-term protection on their own.
The experimental set up for the dosimetric measurement of the UV protection
provided by facial hair showing the rotating platform, the manikin head with the long beard,
the short beard and with no beard. Credit: doi: 10.1093/rpd/ncr418
The big surprise in the many studies Parisi and and colleagues did? Short hair led to less sun damage than long hair - because people with short hair part it less.
Sorry, Duck Dynasty guys. You lose on both counts. Keep those hats on or you won't be happy, happy, happy.
Parisi, A.V., Turnbull, D.J., Downs, N., Smith, D., 'Dosimetric Investigation of the Solar Erythemal UV Radiation Protection Provided by Beards and Moustaches', Radiation Protection Dosimetry July 2012 150(3):278-82. doi: 10.1093/rpd/ncr418
Under the sun beards offer little protection by Marc Abraham, The Guardian