It is faith and piety that open the gates of blessings, whereas vices and evil deeds bring about divine punishment.
God says in Verses 96-99 of Surah Al-A’raf:
“Had the people of the towns believed (in Our revelations) and maintained piety, We would have certainly showered on them Our blessings from the sky and the earth. But they called Our revelations lies, thus Our torment struck them for their evil deeds. Did the people of the towns think themselves secure from Our wrath that could strike them at night during their sleep or that which could seize them during their busy hours of the day? Did they consider themselves secure from the retribution of God? No one can have such attitude except those who are lost.”
Here the people of the towns refers to the people of the world.
In literature, too, such phrases refer to those who think the world is limited to their towns and where they live.
These Quranic verses are in confirmation of the relation between happiness and virtue. That is, the fact that these two truths are inter-related.
Read More:
No one can reach true happiness and joy in this world and the next unless he is an honorable person who has faith in good and avoids vices.
If in this equation, virtue is replaced by vice, happiness would also be replaced by downfall and adversity. When virtue leaves, evil will certainly come, even if people do not expect it.
How can anyone consider himself secure from God’s wrath and punishment? That punishment is the outcome of his own bad deeds and will come to them at night when they are asleep of in the day when they are busy in their worldly activities.