What Miesbacher Hut and Riegelhaube are is briefly explained in the Graphic Dictionary. This is about what they look like and where they came from.
refers to a town in upper Bavaria, from where the hat conquered the rest of the country. It is nowadays believed to be the typical all-Bavarian hat, which it isn't. In fact, it is probably a late 18th century immigrant from Austria, evocative of mountain folk such as peasants and poachers. It is of very stiff felt and exists in non-decorated, braided and embroidered, high-crowned and low-crowned varieties. The lower side of the brim is often covered in satin and gold embroidery/lace/braid, the crown encircled by gold cord - any number of turns - which ends in large gold tassels. Flowers or feathers can be used as additional decoration, but eagle feathers should only be used in areas where eagles actually live. Or used to.
Pictures: Female and male version, underside of female hat (1890s) - all Münchner Stadtmuseum
is a strictly female headdress that, developed exclusively (according to many sources) in and around Munich ("around" nowadays being inside) from stiff gold-encrusted caps that have been documented since the mid 18th century. Other Bavarian regions (again, according to many sources) adopted them from there in the early 19th century.
My recent research, however, suggests that those 18th century forerunners have been used throughout Bavaria, maybe even throughout Southern Germany. Examples are votive paintings from a pilgrim's church some 60 km away from Munich (see also Munich Tracht before 1800 -> Niederschönau) and Mrs Bögner from Tauberbischofsheim, which is outside Bavaria. My guess is that those 18th century caps were discarded and forgotten around 1800 everywhere but in Munich, where it developed into a new shape.
Originally covering the head almost completely, they became smaller (except for the bow at the back) until around 1820, they had reached their final, classic shape. They became still smaller until the 1830s, but the shape didn't change anymore.
A number of varieties developed; the classic ones are silver (preferably but not only) for unmarried women and gold for the married, done in purl and spangles, and black and black-blue in beads for mourning. Some others are done in silver beads, or black and violet, some are chalked white, some are made of brocade, satin stripes or velvet. The silver=unmarried, gold=married equation must be taken with a chunk of rock salt since paintings depict mothers wearing silver caps and little girls wearing golden ones. Maybe wealth and preference or occasion played a much greater role than marital status. So maybe the black and blue-black caps weren't exclusively for widows after all.
Pictures (all stock of the Münchner Stadtmuseum):
gold and silver bead
brocade, velvet, satin
blue-black for mourning
early forms of the Riegelhaube (all pilgrim church Niederschönau, pictures by Monika Höde):
very early shape, in gold
early shape, in gold and red
pre-classic shape, in gold