The Naturalist response to this question is fairly obvious: bad things happen to good people because the universe is an unintelligent, undesigned monstrosity that has no concern for whether it helps or hurts us, and doesn't even know or care who is good or bad.
That good things should happen to good people (and, perhaps, bad things to bad people) is only something that can be understood and caused to happen by an intelligent, compassionate being, and so far we have only found one such being to exist: us.
Therefore, if we want good things to happen to good people (and, perhaps, bad things to bad people), only we can make that so. That means we have to work together to defy the cruel indifference of the natural world, and create our own world of justice and compassion. That is the only way such a world will ever exist.
That is what Secular Humanism is all about, as one can learn by exploring the following Secular Web Library: