That idiom doesn't have a definite origin but there are a lot of speculations about the phrase. There's one version which proposes that it came during the 17th century when the houses were made of thatched roofs. To keep warm, pets like cats and dogs supposedly warmed themselves up on the roof. When it suddenly rains hard, the roof becomes slippery, the animals lose foothold, and they fall through the roof and into the house hence the term "it's raining cats and dogs."