There are various theories. One is that cats were associated with wind and dogs with rain in Norse mythology. Another suggests that in heavy rain, dead animals were carried along the streets by the water. We don't really know the truth.
One theory states that in the oldern times, homes had thatched roof, in which domestics animals like cats and dogs used to hide and in heavy rain, the animals were washed out, so it would seem to be "raining cats and dogs."
Another theory states that during heavy rains, the dogs used to howl and cats used to meow, thereby indicating that something unusual will happen.
Another theory (i don't remember which) states that cats represent wind and the dogs represent rain , so when it pours down heavily, we use the term, "raining cats and dogs."