:sl:
I always prayed. Didn't do anything bad. Then why would Allah will such bad to happen to me?
Brother, we can be the most obedient people in the world but Allah will not stop bad things happening to us in our life. Simply because it is all a part of the test. There are many such ayats and hadiths saying how Allah will severely test the believers and it is also mentioned that those who are tested most are very loved by Allah. Simply look at the lives of the Prophets and Messengers, upon them be peace. They were the best of people, yet still experienced many trials and tribulations. The point is: that's life.
Affirming faith by the tongue is not enough, we need to be strong at heart and have conviction in Allah at good times and bad. Remain thankful and patient consistently.
When things go wrong, we shouldn't say 'why me? I pray so much, give zakat, help everyone, it's unfair! etc etc', we need to be patient and have tawakul (trust in Allah) that whatever is happening is due to the infinite wisdom of Allah.
Perhaps the hardship will be beneficial to us later on in life. For example, imagine a child always being bullied in school/grows up in an atmosphere of so much trouble. Imagine this child growing up to be a teacher and because he realises just how damaging bullying is, he sets up support groups to help the bullied kids be protected.
Now the bullied kids would get help and this man will be rewarded if his intentions were for the sake of Allah (and let's be certain here - the only thing that is beneficial in the akirah is how many good deeds we have). Neither would have happened had he not experienced the trauma of bullying himself.
So, we need to think long term. There is always a reason for everything. We don't see it immediately when the hardship hits us, because of the trouble it causes us but much later on we can usually see that there is some clear purpose for it to have happened. That's why we need to be patient and
submit to the wisdom of Allah and let him do as he pleases with us.