"A good book that addresses the question of "Why bad things happen to good people" is Lee Strobel's The Case for Faith"
Or, the book of Job.
The very concept of "bad" things hinges around the idea of people being punished far beyond they deserve, by the way, either because they're innocent victims or because they're punished far too harshly for their sins.
When something adequately bad happens to bad people, it's called justice, be it from God or from human law.