Indeed, Allah will not change the condition of a people until they change what is within themselves. Quran [13:11]
This is an important verse which indicates that Allah, may He be blessed and exalted, in His perfect justice and wisdom does not change the condition of the people from good to bad or from bad to good, from ease to hardship or from hardship to ease, unless they make the attempt to change their condition themselves. So if they are in a state of righteousness and goodness and they change, Allah might change things for them with punishment, calamities, hardship, drought, famine, disunity and other kinds of punishments as appropriate requital. Allah says (interpretation of the meaning):
“And your Lord is not at all unjust to (His) slaves” [Fussilat 41:46].
Or they may be in a state of evil and sin, then they repent to Allah and turn back to Him, and they regret their sins and adhere to obedience, so Allah changes their state of wretchedness, hardship and poverty to ease, unity and righteousness because of their good deeds and their repentance to Allah, may He be glorified and exalted. It says in another verse (interpretation of the meaning):
“That is so because Allah will never change a grace which He has bestowed on a people until they change what is in their own selves” [al-Anfaal 8:53].
This verse tells us that if they are in a state of ease, comfort and goodness, then they change and turn to sin, their situation will be changed — there is no power and no strength except with Allah — or they may be given respite. The opposite is also true: if they were in a state of evil and sin, or disbelief and misguidance, then they repent, regret their sin and adhere to obedience to Allah, Allah will change their situation from bad to good; He will change their disunity into unity and harmony; He will change their hardship to ease, well being and plenty; He will change their situation from draught, famine, , lack of water and so on to rainfall, fertile land and other kinds of goodness.
May Allah help us attain (and maintain) goodness, ameen.