It suggests that bad luck comes in waves, and that when one misfortune occurs, others are likely to follow quickly.
Here are some examples of how it's used:
* "My car broke down, and then I got fired from my job. When it rains, it pours."
* "I was already stressed about the exam, and then my dog got sick. It's like when it rains, it pours!"
The proverb likely originated from the experience of having a sudden downpour of rain, with all the negative consequences that come with it, like flooding and getting drenched.
The phrase emphasizes the feeling of being overwhelmed by bad luck, with one misfortune leading to another in a seemingly endless cycle.