ذَلِكَ بِمَا قَدَّمَتْ أَيْدِيكُمْ
...
This is because of that which your hands forwarded.
meaning, this punishment is the recompense of the evil deeds that you have committed in the life of the world. This is your reckoning from Allah for your deeds,
...
وَأَنَّ اللّهَ لَيْسَ بِظَلَّمٍ لِّلْعَبِيدِ
And verily, Allah is not unjust to His servants.
Certainly, Allah does not wrong any of His creatures, for He is the Just, who never puts anything in an inappropriate place. Honored, Glorified, Exalted and Praised be He, the All-Rich, Worthy of all praise.
Muslim recorded that Abu Dharr said that the Messenger of Allah said;
إنَّ اللهَ تَعَالَى يَقُولُ يَا عِبَادِي إِنِّي حَرَّمْتُ الظُّلْمَ عَلَى نَفْسِي وَجَعَلْتُهُ بَيْنَكُمْ مُحَرَّمًا فَلَ تَظَالَمُوا
يَا عِبَادِي إِنَّمَا هِيَ أَعْمَالُكُمْ أُحْصِيهَا لَكُمْ فَمَنْ وَجَدَ خَيْرًا فَلْيَحْمَدِ اللهَ وَمَنْ وَجَدَ غَيْرَ ذَلِكَ فَلَا يَلُومَنَّ إِلاَّ نَفْسَه
Allah, the Exalted, said, `O My servants! I have prohibited injustice for Myself, and made it prohibited to you between each other. Therefore, do not commit injustice against each other.
O My servants! It is your deeds that I am keeping count of, so whoever found something good, let him praise Allah for it. Whoever found other than that, has only himself to blame.
This is why Allah said,