Masonic hats worn by the Master of the Lodge signify his authority of his rank and status...the origins of which go back over many centuries.
The wearing of a hat by the Worshipful Master alludes to the crown that adorned the head of King Solomon.
In the United States, a Stetson Homburg or Fedora style hat is quite popular and is often chosen by the Master of the lodge. Other hat brands and styles are also worn.
Albert Mackey, Masonic researcher and historian had this to say about Masonic hats in his Revised Encyclopaedia of Freemasonry, 1929:
To uncover the head in the presence of their superiors has been, among Christian nations, held as a dutiful obligation.
Among Eastern nations, it is their custom to uncover their feet when they enter a place of worship.
Kings:
Historically, Kings wore crowns to denote their rank, while the courtiers standing around him removed their hats in deference to his superior status.
Ancient Romans
We are told that the ancient Romans prayed with their head covered or veiled.
The woolen cap, called a pileus, was allowed to be worn only by the free-by-birth or manumission (papers with which one is formally released from slavery), but it was forbidden for Roman slaves to wear this cap.
House of Commons - London
Historically, it was customary that a member of the English Parliament, London's House of Commons, wear a hat when he addressed the membership of the House. If he were to have risen to speak without his hat, other members would greet him with cries of "Order, Order"!
France
In France, it was the custom of monks at the Sorbonne, (previously called the University of Paris which was founded in 1257 by Robert de Sorbon) to remove their cap when a member did not wish to speak or was in token of agreement with the others.
(End of Mackey quote from Mackey's Encyclopedia of Freemasonry, 1929)
Masonic Hats: United States:
Today, Masonic hats are worn, ceremonially, in the United States during the time when the lodge is in session. Some Grand Lodges require that the hat be constructed with a brim. Others simply decree that the Worshipful Master remains covered at all times.
Masonic Lodge of Education