This may be a no brainer for some parents, but i have just discovered that it works wonderfully! While at the beach with our 18 month-old daughter, we realized that her sun hat would not stay on. Either because of the wind or because she would pull it off. So we simply bought a multicolored bandana, doubled it over and tied it on! She never bothered with it and looked pretty darn cute too.
Bandanas are a great camping hack as well! Head covering, nose wiper, hand dryer, table duster, etc. (but hopefully not at the same time).