Not all disasters and problems are divine punishment, but according to some verses and narrations, promulgation of sins and ignoring the divine worship play an important role in descending of catastrophe in people's lives.
It has been mentioned in a prophetic narration that: there is angel of Allah Almighty who says during nights and days: O servant of Allah! Stop committing sin, if there were no animals to pasture, and no babies to feed and no elderly people to worship, as a result of the widespread of sins, an excruciating painful punishment would befall you all.
source : erfan.ir