Here are two examples of the usage of this expression:
'We were afraid we would have to close the school because we had so few students. Then, in December, we had fifty new enrollments. When it rains, it pours!'
'I was thinking I would never make any friends in my new town and that all my old friends had forgotten me. Then, yesterday, a co-worker invited me to her house for dinner, I got three letters from home and my new neighbor brought me a plate of cookies. When it rains, it pours!'
As you can see, 'when it rains, it pours' means that related events seem to come in groups, especially after what seems like a 'drought,' or extended shortage.
I hope this is helpful,
Student or Learner