Headwear
The hat, so to speak, covers the entire personality, much like a roof. Wearing a headpiece in a dream may symbolize a general attitude or worldview, but it can also reflect how others perceive you—likely expressed in a compensatory way relative to how you see yourself. The hat might represent the overarching idea that unites many smaller ones beneath it. In Germany, there is a saying about "gathering everything under one hat." Dreaming of putting on a foreign hat could suggest adopting an unfamiliar idea under whose influence you now find yourself. The headdress is something that takes possession of its wearer. (Psychology and Alchemy, par. 53.)
Identity
The hat is a powerful expression of how one wishes to be identified by others and how one identifies oneself. In magical thinking, one could say you become what you wear on your head. The crown makes the wearer a king; feathers in the hair transform the person into a shaman; a beret signals artistry; the clown's goofy hat declares that he is not to be taken seriously; when the policeman or officer dons his cap, he step into the role of a deadly serious professional. Examples are endless of how the hat symbolizes overarching identity—something that may be consciously chosen yet remains unconsciously impactful.
Persona
It’s worth noting that one puts on a hat when stepping out to interact with others. The police officer doesn’t wear his or her hat at home, the Native American likely doesn’t wear his feather headdress in his tent, and clowns only don their ridiculous hats when performing. Moreover, none of these individuals would wear another’s headgear in public! Thus, the hat represents how we want others to perceive us, and how we identify ourselves.
Reverence and Hierarchy
Taking off one’s hat is a sign of respect. It symbolizes making oneself shorter and less significant. Conversely, the decline in hat-wearing in modern times might reflect a distancing from traditional power structures that are no longer relevant.
Practical Use
Beyond the psychological and symbolic aspects of headwear, which we have primarily discussed here, one can also consider its practical function in real life—it serves as protection. The wide-brimmed hat shields from the blazing sun, the cap prevents glare, the beanie wards off cold, and the helmet protects against physical harm, among other uses. Thus, apart from identity and related aspects, it may also be worth asking what one seeks to protect oneself from by wearing the headgear in a dream.