I think what the parent means is a hat that's an indispensible article of formal dress. They certainly still have their place, but it's not like there's an expectation to see everyone in cowboy hats at a Texas wedding.
The only place I'm aware of where hat use as a matter of dress and appearance is still strictly adhered to is in the US military.