It is just like English sayings and phrases, there are Japanese sayings and phrases as well. It is called [kotowaza ことわざ].
What is the KOTOWAZA?
Kotowaza is the Japanese saying/phrases which expresses people’s wisdom and it has been told by many people from long time ago. And it is an example of something and a teachings of the life.
Today’s kotowaza
雨降って地固まる・AME FUTTE JI KATAMARU


The Origin
It has been said that after falling the rain, the ground become harder than before.
Its meaning
After the troubles、everything become much better condition on the contrary. And English have many similar expressions. Please check below;
After a storm comes a calm/Adversity strengthens the foundations/Rain settles the soil/Good come out of evil.
How to use it
斉藤君とよくけんかしたけど、今は親友だ。雨降って地固まるとは、こういうことだろう。
Saito kun to yoku kenka shitakedo, ima wa shinyu da. ame futte ji katamaru towa, koiu koto daro.
I often had arguments with Saito kun but he is my best mate now. Ame futte ji katamaru means this.
This situation is exactly like that as often happens, their relationship now seems to be better than it was before they quarreled.

arigato