In The Name of Allaah, The Most Merciful, The Bestower of Mercy
Allaah [The Most High] says in Surah Al-Araaf Aayaat 130-131
[وَلَقَدۡ أَخَذۡنَآ ءَالَ فِرۡعَوۡنَ بِٱلسِّنِينَ – And indeed We punished the people of Fir’aun (Pharaoh) with years of famine]; Meaning: Afflictions and drought for a long time; [وَنَقۡصٍ۬ مِّنَ ٱلثَّمَرَٲتِ لَعَلَّهُمۡ يَذَّڪَّرُونَ – and shortness of fruits (crops, etc.), that they might remember (take heed)]; Meaning: They were afflicted in order for them to realise that what befell them was a punishment from Allaah and so that they might abandon their disbelief. However, neither was this admonition useful to them nor did it benefit them, rather they persisted in transgression and corruption.
Then Allaah [The Most High] says: [فَإِذَا جَآءَتۡهُمُ ٱلۡحَسَنَةُ قَالُواْ لَنَا هَـٰذِهِۦۖ -But whenever good came to them, they said: “Ours is this]; Meaning: When the land became fertile and provision was in abundance, they said, “We deserve this” and they did not thank Allaah.
Then Allaah [The Most High] says: [ وَإِن تُصِبۡہُمۡ سَيِّئَةٌ۬ يَطَّيَّرُواْ بِمُوسَىٰ وَمَن مَّعَهُ – And if evil afflicted them, they ascribed it to evil omens connected with Musa (Moses) and those with him]; Meaning: When the afflictions and drought reappeared, they said, “This came to us due to the presence of Moosaa and those who follow him”.
Then Allaah [The Most High] says: [أَلَآ إِنَّمَا طَـٰٓٮِٕرُهُمۡ عِندَ ٱللَّهِ وَلَـٰكِنَّ أَڪۡثَرَهُمۡ لَا يَعۡلَمُونَ – Be informed! Verily, their evil omens are with Allah but most of them know not]; Meaning: The afflictions reappeared by the divine will and decree of Allaah and not what you think; rather your sins and disbelief is the reason that brought about these afflictions.
[An Excerpt from ‘Tayseer Al-Kareem Ar-Rahmaan Fee Tafseer kalaam Al-Mannaan’ of Imaam Sadi (rahimahullaah)]