Hats as noteworthy objects in dreams are not too common. A hat can be seen as an extension of power and influence in the dream. Removal of the hat by another can be taken as an invitation to confrontation. Giving a hat to another may be considered a romantic wish-fulfillment projection.
Also, the presence of a hat may be related to a dream of percieved balding.
In some cases, the hat is simply a reminder of another event, such as a sporting event involving a professional team, or an activity like skiing or fishing.