One supposed origin is that the phrase derives from mythology. Dogs and wolves were attendants to Odin, the god of storms, and sailors associated them with rain. Witches, who often took the form of their familiars - cats, are supposed to have ridden the wind. Well, some evidence would be nice. There doesn't appear to be any to support this notion.
It has also been suggested that cats and dogs were washed from roofs during heavy weather. This is a widely repeated tale. It got a new lease of life with the e-mail message "Life in the 1500s", which began circulating on the Internet in 1999. Here's the relevant part of that:
I'll describe their houses a little. You've heard of thatch roofs, well that's all they were. Thick straw, piled high, with no wood underneath. They were the only place for the little animals to get warm. So all the pets; dogs, cats and other small animals, mice, rats, bugs, all lived in the roof. When it rained it became slippery so sometimes the animals would slip and fall off the roof. Thus the saying, "it's raining cats and dogs."
Quite funny!!!