Overall meaning :
Allah Almighty says: Why were there not among the past generations that We destroyed before you individuals possessed of good sense, virtue and piety to forbid and warn against unbelief and corruption in the land, except for a few who believed and whom We saved when the punishment overtook the wrongdoers? But most of the wrongdoers only pursued the worldly pleasures they were given, preferring them to life hereafter, and were wicked evildoers who persisted in their unbelief and sins, and so they became deserving of punishment.
Your Lord, Muhammad, would never unjustly destroy any community while its people are righteous and avoid corruption, oppression and injustice. Had your Lord willed, He could surely have made all mankind one single community following the same religion, namely Islam, but He willed it otherwise, and so they continue to differ in their religion, except for those upon whom your Lord has bestowed His grace and so they believe in Him and follow His messengers, never disputing the fact that Allah is the only True God worthy of worship and that their messengers have brought them the truth. It is His will, for reasons known to Him alone, to create them into two different groups, one group will attain eternal bliss and the other will be doomed to misery, and everyone will find it easy to do such deeds as will lead him to his destined place for which he has been created. And thus the decree of your Lord based on His foreknowledge—that He will fill Hell with those deserving it among the jinn and humankind who follow Satan and his soldiers and are not guided to faith—will certainly be fulfilled.