Ash-Shura - 42:30

وَمَا أَصَابَكُم مِّن مُّصِيبَةٍ فَبِمَا كَسَبَتْ أَيْدِيكُمْ وَيَعْفُو عَن كَثِيرٍ
[42:30]
And whatever affliction befalls you, it is on account of what your hands have wrought, and (yet) He pardons most (of your faults).
Whatever misfortune happens to you, is because on the things your hands have wrought, and for many (of them) He grants forgiveness.
Whatever of misfortune striketh you, it is what your right hands have earned. And He forgiveth much.