Top hats, tall hats with a flat top and a wide brim, first began to be worn in the 16th century in Europe. They were particularly popular in Victorian era England in the 19th century. Naturally, top hats were also popular across the pond in the United States. Most men would not leave home without a hat on.
It was also tradition for US presidents to wear a top hat for their inauguration and first day. This all changed after John F. Kennedy however, who was the last US president to wear a top hat for his inauguration in 1961.
People have differing ideas about why hats fell out of favor in the 20th century and why US presidents stopped wearing them. It was most likely due to changing trends in attire and fashion as formal hats became less and less visible.
More about US presidential inaugurations: