"We know that we are children of God, and that the whole world is under the control of the evil one."
That's why bad things happen, because we are currently living in Satan's domain. This is his turf and he's in control down here. The sad truth is there is no guarantee for anyone that bad things won't happen to them or the ones they love. It's just the sad truth.
But there is an uplifting truth, too, and that is this world is not all there is. Satan might be in charge down here, for now, but that is not the end of the story. Psalm 108:13 says:
"With God we will gain the victory,
and he will trample down our enemies."
With God, there is victory because we know how the story ends, just like any book, just flip to the end of the Bible. In Revelation 19:20 it tells us,
"But the beast was captured, and with it the false prophet who had performed the signs on its behalf. With these signs he had deluded those who had received the mark of the beast and worshiped its image. The two of them were thrown alive into the fiery lake of burning sulfur."
I don't know about you, but its really nice to know that the good guys ultimately win in the end. It really helps get through the days when it seems like that is not the case. And another thing that helps me, is to remember that I can't see the big picture of life, I have no idea what the grand scheme of things is--all I can see is what is directly in front of me. But God knows, he can see the whole big thing, and even though I may not know why something happens, whether it be something good or something bad, I have faith that there is a greater purpose at work.
"And we know that in all things God works for the good of those who love him, who have been called according to his purpose."