This story is a reminder of the power of saying Istighfaar (seeking forgiveness) frequently. Let's remember that the Prophet (s.a.w) used to say Istighfaar frequently during the day.
Tafseer Al-Qurtubi states:
A man complained to Al-Hasan about a drought, and he said to him: "Pray to Allah for forgiveness."
Another man complained to him of poverty and he said to him: "Pray to Allah to forgive you."
Another man said to him: "Pray to Allah to bless me with a child." He said: "Pray to Allah for forgiveness."
Another complained to him that his garden was dry. He said to him: "Pray to Allah for forgiveness."
He was asked about it and he said:
"This is not my personal opinion, for Allah says in Surah Nooh (interpretation of the meaning): 'Ask forgiveness from your Lord, verily, He is Oft Forgiving; He will send rain to you in abundance. And give you increase in wealth and children, and bestow on you gardens and bestow on you rivers." Tafseer Al-Qurtubi (18/301-302)
One of the narrators of a Hadith was asked about the manner in which forgiveness is to be sought, to which he answered:
"The Messenger of Allah (sallallaahu 'alayhi wa sallam) used to say: 'Astaghfirullah! Astaghfirullah! (I beseech Allah for forgiveness, I beseech Allah for forgiveness)'. [Saheeh Muslim].