This question really has two different answers. The first answer is more direct which is that our desire and purpose is to glorify God in the things we do. There is evil in the world no doubt, but the fact that there is evil should not give us pause in fulfilling God’s plan for our lives. In fact you can’t have evil without good and there is no good without God. We also have to remember that when God declares that evil happens then we have to say that it is good it occurs because God is altogether good in what he ordains.
The other thing to remember, which is not so direct, is that sometimes we decide what is good for us and then put God in our own little box. We forget that all of us start off in a depraved state and would be eternally separated from the grace and mercy of God if not for Christ. The question we should be asking instead of this one is why is it that God does not punish all evil and sin? Why does he show any of us mercy when we all deserve judgment?
If we get ourselves in this right frame of mind then our time here on earth will not be spent wondering why bad things happen to good people, but rather why good things happen to anyone at all. We will then also answer this question by understanding that it is only by his grace that we are saved and it will be our desire to glorify him for this reason.