Hats are good for your health, but a style liability. A hat is either going to make your look perilously casual or overly fashion-y. Both are bad
Most guys wear ball caps with some kind of graphic on them. It’s like wearing sandals on your head — you’re trapped all the way at the casual end of the casual-formal style continuum.
Other guys wear fedoras, trilbys, Panamas, and other brimmed hats. These can work for 75-year-old jazz legends and Harrison Ford. For the rest of us, it looks like we’re trying too hard. “You look cool only when you’re not trying to look cool” is a cliché because it’s true.
But don’t take my word for it (do, though), try an image search for “men’s hat styles” or similar, and ask yourself of each photo, “Would this guy look better without the hat on?” For me, the answer is always “yes.”
The best compromise is a solid black ball cap with no graphic on it. It’s as good as a hat can look. Which is to say, you look neither more nor less stylish when you wear one. Solid navy blue and gray can also work, but black looks the best.
Wear it when you’re going to be outside for an extended period of time. If you’re doing something like hiking, don’t worry about any of this. I’ve worn hats while fishing that breach the Geneva Conventions.
Ball caps are one of the few clothing items that aren’t gouge priced when you buy them new. I still get mine at thrift stores at an average price of $3. It’s less gross than it sounds. Just clean before you wear.