To phrase this more precisely: In most newsreels, photographs, and film footage (from the 1900s up to 1966) of the general public, it is observable that most men wore hats (i.e. bowlers, fedoras, etc.). Yet around the 1960's, this appears to abruptly stop.
What precipitated this sudden change?
Quoting from a previous answer is just a starting point not intended to discourage more discussion. More questions, info, and debate are welcome.
It's a bit of a quibble, since you are interested in "why", but I'm not certain of the end date of behatteddude. I don't know the number of men wearing hats, but I can at least find images dated before then with mixtures of men with hats and men without hats.
But you can certainly find plenty of images with lots of hats, so there's not a lot of point either way.
There were citations of sources for decline prior to the 1950s in "In the early/mid 20th century did men really wear hats all the time, and if so, did they always have crazy hat hair?" under https://www.reddit.com/r/AskHistorians/comments/469icw/in_the_earlymid_20th_century_did_men_really_wear/d047274/ . That has a link to a couple of articles (Esquire and a contemporary newspaper) that cited surveys of the time, with reasons. The links on the uppermost reply were not curated, so cum grano salis.
'"[J. F.] Kennedy despised how he looked in hats and usually refused to wear them - despite howls of protest from habderdashers whose hat sales took a precipitous downturn in the 1960s" (Barbara Perry). What factors led to the downturn in menswear hat sales in the 1960s?' at https://www.reddit.com/r/AskHistorians/comments/68hta6/j_f_kennedy_despised_how_he_looked_in_hats_and/ has several answers by /u/chocolatepot
In a sibling comment to this, /u/ShaiDorsai mentions the theories that it was Kennedy or Eisenhower what done it. I think that it's desirable to more firmly debunk the Great Man theories here. The decline in the US began before either man. I recall reading that Eisenhower was often enough seen hatless; snopes in "John F. Kennedy’s Hat" at https://www.snopes.com/history/american/jfkhat.asp states "Dwight D. Eisenhower, who frequently went hatless throughout his eight years in office". The only applicable-looking citation is Ambrose, Stephen E., Eisenhower: The President.