My father was a hat man. No matter the weather or the occasion, he had a hat for it. Most often he sported a short brimmed fedora; it was just part of who he was, and he had tons of them. But, he also had hats for hunting, fishing, softball...or just about anything else. I am not sure when wearing hats went from being something everyone did, to something only a small portion of the population thought important, but one friend of mine in graduate school suggested that the downfall of hats began with John F. Kennedy. According to this individual, Kennedy was the first president to attend his inauguration NOT wearing a hat. Now, I don't know if this is true or not, but it would make sense. He and Jackie were trendsetters and after all JFK did have a nice head of hair. Hat makers! Now you have someone to blame.
It doesn't take too long when looking at historic pictures see how important hats were in society up into the 20th century. A view of any street scene from the 1850s to the 1940s will show just about every man...and most women, wearing a hat of some fashion.
Sometimes the season determined the hat. For example, broad-brimmed straw hats were popular in the summer because they provided shade, were light weight, and allowed the head to "breathe." Sometimes fashion determined the hat. The top hat was a popular choice in the 1850s and 1860s among those that could afford it. In the 1880s and 1890s the derby ruled, and in the 1920s the flat-topped short-brimmed straw hat was all the rage. Sometimes an occupation determined the hat. Railroad engineers had their own hats, police had their own styles, and army regulations usually determined what was and wasn't acceptable in headgear.
Of course, hats are still popular for the sporting crowd...more accurately "caps" are still popular. Instead of traditional hats, baseball-style caps have taken over the hat market. Caps come in just about every color, style, and team imaginable. Trends still happen in caps as well. A few years ago the mesh "trucker" hats were the cool thing. At one time the more curved you could make the bill the better, but lately the urban trendsetters have made the "straight-brim" the look.
Who knows if hat styles will come back around. The Indiana Jones movies brought the fedora out hiding for some men a number of years back, but the only place you really see women wearing hats now are at church on Easter or at the Kentucky Derby. Maybe we will get back to that 1940s look, but don't hold your breath. One thing you can count on though is that, like history, hats and caps will continue to change with the times.