Mid-1800's. They became popular in the USA and were common headwear in the wild west.
Not sure why it took me so long to get one since they've probably always been my favorite hat as far as 'looks'.
For comfort I'm a Fedora man... I'd say bucket hats and Fedora's are what I wear the most. I have a couple straw fedora's, big brim, (like and Indiana Jones hat), that I wear in hot weather and to work. I almost never wear caps anymore. Like you I have a Ram's SB cap with the tags stilll on it and it's never been worn. - JamesJM