In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Allaah [The Most High] says in Surah Al-A’raaf Ayah 100-102:
[ أَوَلَمۡ يَهۡدِ لِلَّذِينَ يَرِثُونَ ٱلۡأَرۡضَ مِنۢ بَعۡدِ أَهۡلِهَآ أَن لَّوۡ نَشَآءُ أَصَبۡنَـٰهُم بِذُنُوبِهِمۡۚ وَنَطۡبَعُ عَلَىٰ قُلُوبِہِمۡ فَهُمۡ لَا يَسۡمَعُونَ- Is it not clear to those who inherit the earth in succession from its (previous) possessors, that had We willed, We would have punished them for their sins. And We seal up their hearts so that they hear not?]- Meaning: Allaah [The Most High] informs those who inherit the earth in succession from those who preceded them, that He [The Most High] destroyed their forefathers due to their sins, yet they commit the same sins that were committed by their forefathers! Do they not take heed that had Allaah willed He would punish them due to their sins, for this is the manner in which Allaah deals with mankind – both the previous nations and those who inherited the earth after them. Allaah [The Most High] warned those who inherited the earth from the previous nations, but they did not take heed; sent them reminders but they did not reflect; showed them guidance through signs, but they did not follow guidance, so Allaah punished them by sealing their hearts – neither did truth enter their hearts nor did good reach their hearts; nor did they give an attentive ear [to the truth]; rather they only heard that which established the proofs against them.
Then Allaah [The Most High] said:[تِلۡكَ ٱلۡقُرَىٰ نَقُصُّ عَلَيۡكَ مِنۡ أَنۢبَآٮِٕهَاۚ وَلَقَدۡ جَآءَتۡہُمۡ رُسُلُهُم بِٱلۡبَيِّنَـٰتِ فَمَا ڪَانُواْ لِيُؤۡمِنُواْ بِمَا ڪَذَّبُواْ مِن قَبۡلُۚ كَذَٲلِكَ يَطۡبَعُ ٱللَّهُ عَلَىٰ قُلُوبِ ٱلۡڪَـٰفِرِينَ – Those were the towns whose story We relate unto you (O Muhammad). And there came indeed to them their Messengers with clear proofs, but they were not such as to believe in that which they had rejected before. Thus Allah does seal up the hearts of the disbelievers (from each and every kind of religious guidance)]-Meaning: Messengers came and called them to that which will lead to happiness [in the life and the next]. Those Messengers were given manifest signs and clear evidences to clarify the truth, but the people did not listen and thus were not benefited. And because they belied those manifest signs and clear proofs after being well aware of them, Allaah [The Most High] prevented them from accepting the sound and infallible creed ordained by Allaah. This was punishment on them because they rejected the truth, just as Allaah [The Most High] said in Surah Al-An’aam Ayah 110:
[وَنُقَلِّبُ أَفۡـِٔدَتَہُمۡ وَأَبۡصَـٰرَهُمۡ كَمَا لَمۡ يُؤۡمِنُواْ بِهِۦۤ أَوَّلَ مَرَّةٍ۬ وَنَذَرُهُمۡ فِى طُغۡيَـٰنِهِمۡ يَعۡمَهُونَ – And We shall turn their hearts and their eyes away (from guidance), as they refused to believe therein for the first time, and We shall leave them in their trespass to wander blindly].
Then Allaah [The Most High] says in Ayah 102 Surah Al-A’raaf: [وَمَا وَجَدۡنَا لِأَڪۡثَرِهِم مِّنۡ عَهۡدٍ۬ۖ وَإِن وَجَدۡنَآ أَڪۡثَرَهُمۡ لَفَـٰسِقِينَ – And most of them We found not (true) to their covenant, but most of them We found indeed Fasiqun (rebellious, disobedient to Allah)]-Meaning: The majority of the nations -to whom Allaah [The Most High] sent Messengers – were not true to their covenant. Neither were they steadfast nor did they adhere to the commands of Allaah, nor did they submit obediently to the commands of Allaah which the Messengers ordered them to obey; rather they followed their desires, except a very few of them. The majority of them turned away from guidance out of arrogance, so Allaah sent them various types of punishment.
[Source: An Excerpt from Tayseer Al-kareem Ar-Rahmaan Fee Tafseer Kalaam al-Mannaan’ by Imaam As-Sadi (rahimahullaah). Slightly paraphrased]