While a vast number of idioms originate from historical periods, this is not true of all of them, and ‘having a bad hair day’ is one of these exceptions.
Originally meaning ‘a day when your hair seems unmanageable', the use of this expression has now extended to describe a day when everything seems to go wrong.
The idiom itself originated in the 1992 film ‘Buffy The Vampire Slayer’, when Buffy (Kristy Swanson) says to the one-armed vampire (played by Paul Reubens): “I’m fine but you’re obviously having a bad hair day!”