I've been asked that question by people worried that what they're going through is punishment from God for something or other. Maybe that kind of question would have come from people living before Vatican II, the time when we only hard about God in that way. After Vatican II, we began hearing about God as being loving and compassionate.
That's a question that surfaced in Jesus' day, too, when people asked him about how guilty the people were that had a tower fall on them.
I don't know that God needs to punish us for anything, because we do a lot of that ourselves. I don't know that God even needs to send anyone to hell, because that's more a human choice.
I do trust God to be doing all that is possible - as much as we let God do something for us - so as to help us not only survive this life, but to enter into and enjoy eternal life with God.
I don't know how people in California might hear the first reading, about Moses and the burning bush. They might be unable to forget the fires that raged through their area, but I hope they aren't looking at God as having sent the flames their way. Instead, like Moses, may they keep hearing the message that God promises salvation and life, not death.
May we too offer others hope of life and well-being, and not judge them as deserving death. That's not God's message to Moses and to us, and it shouldn't be what we get stuck in our thinking processes.
God saves, and reaches out to anyone in trouble. Thank God for that!