Dear Zafreen,
The problem of evil is a real issue for some people. Including me sometimes. But I think that there is an explanation. You see, in my humble opinion everything God does can be backed by 2 principles. Either Justice or Mercy.
Evil in this life can be considered as necessary justice or mercy from God.
First thing to be considered is that being tested is an essential part of this life(with either good or evil). This is part of God's mercy. As these tests allow humans to wake up and start moving towards the right path. Tests are a way to teach humans. Without them one could find himself deserving hell without realizing it. And it would not be unjust for him to go to hell. But because of God's mercy there are tests that allow help us in our spiritual growth.
But why test us in the first place ?
Again according to my understanding, its out of God's justice that we are tested. After all we are the ones who chose to be responsible of the AMANA.
Sometimes some people are a test for others. Just like the poor are a test for the rich.
But what did the poor do to be in this position in the first place ?
I think that it's part of God's wisdom. He knows what's best for every soul. Maybe if this poor person was made rich he would transgress. So God made him poor which is again mercy from God. Maybe being poor for a particular person is something necessary for his spiritual growth. Only God knows.
What I am trying to say is that sometimes God may do things that may seem evil from the outside because we do not see the whole picture. But maybe this evil is actually good. Because it may help a person enter paradise.
On the other hand, God also said that people who believe and do good deeds in this world, will live a good life. (On earth). so its not all evil. Also blessing in this world for some people are actually a bad thing. Because god uses them to mislead the wrongdoers. Sometimes there is underlying wisdom that we do not comprehend. Remember the story of moses and the man who was granted knowledge ?
Another example is how god created people ranks over each other. This is necessary for life on earth to go on. Evil is this world can also be a punishment from God. (This is out of justice)
Finally, the reward of the hereafter is better and more lasting. So what ever befalls a person in this world. One must remember that its not the end. On the contrary its merely the beginning.
A child is unlikely to say thank u for raping me, mutilating me, torturing me and killing me so I could reach paradise
There is wisdom behind everything that happens. Even if it seems evil. God is just and merciful. So anything that happens can be originated from these 2 principles. Even if with our limited perception we can't see the wisdom behind what happens.
Hope this helps.