The earliest reference to the top hat, per se, comes from the 1790s. But men's hats were popular much earlier than that. During the Colonial period, men's hats took the form of the tri-corn, or three-cornered hat. The tri-corn was simply a variation of the standard farmer's hat used to shield his eyes from the sun.
The three-cornered hat consisted of a somewhat low, round crown surrounded by a wide brim, which was gathered against the crown and held in place by 'blocking' or shaping it over a wooden block form. By the 1790s, the top hat became popular. Instead of a low, round crown, the top hat took the form of a cylinder with a flat top. A flat brim, smaller than that of the tri-corn, was lifted up slightly on either side, but not on the front or back. The height of the cylindrical shaped crown varied over the years, sometimes, as in the case of the 'stovepipe' hat, reaching absurdly tall dimensions.
The first top hats, like the tri-corn, were originally made of felt, derived most often from the soft under fur of beaver pelts.
The finisher completed the process by sewing a leather or satin sweatband to the inside edge and a silk ribbon to the outside, around the crown where it met the brim. Many of the early hats were left in their natural (fur) color, but when it became fashionable in the 1820s and 30s for top hats to be black, they would be dyed prior to the addition of the sweatband and ribbons.
Around the year 1830 silk fibers began to be used in addition to, or in place of, the beaver fur. Initially a fur/felt hat would be produced and then its surface covered with a coating of shellac, onto which silk plush would be sprinkled. Later on, as the beaver fur became less and less available, the hat's structure was made from calico. The use of beaver fur in hat making eventually died out around the 1860s. The silk fibers, or plush, that were used in hat making were produced by a special type of machine up until the 1970s.
It might be noted that the fumes from the acid in the battery, around which the hatters worked, would sometimes lead to mental instability ~ hence the phrase: Mad as a Hatter.