This was the thinking behind the question of John 9. A man is blind (effect). It was naturally assumed that personal sin must have been the cause. But whose was it? His own? His parents? Grandparents? Kids?Obviously someone did something wrong. Bad things don't happen to "good" people.
Notice Christ's response. The man was born blind so that God would be glorified. Can you feel the weight of that? Here was a man who had suffered for decades in order that at this particular moment Christ might display His mercy and magnify His grace.
Anyone familiar with the Old Testament should recognize this refrain. It is very similar to the problem that is dealt with in the book of Job. The Sabeans steal the oxen and the donkeys and strike down the servants. Fire falls from heaven and burns the sheep and the servants. Chaldeans raid, take the camels, and destroy the servants. Wind blows across the wilderness and topples the wall of the house in which his seven sons and three daughters were feasting. Loathsome sores break out on his body, his friends reject him, the young mock him, and his wife implores him to curse God. Surely Job was suffered.
His friends are convinced that they have insight into the situation. Certainly, they say, Job had sinned against God. Surely he was suffering the effects of his own transgression. His friends implored him to admit his sin, to repent, and be restored.
How does God deal with the answer regarding Job's suffering? If you are not sure, I highly encourage you to go read Job 38-42. Rather than saying, "you see Job, this is exactly what I was doing in this," God speaks of His sovereignty and power and wisdom and creativity. That does not exactly fit into our clean cause and effect categories. After reading the book we cannot point to a particular sin of Job and we cannot merely blame it on Satan. It is not that simple.
We will all suffer. This is the deserved lot of humanity in this age. We would thus do well to develop a theology of suffering before the dark night comes. You do not wait until you are choking to learn the Heimlich and neither should you wait until you are in the throes of tragedy before learning the reason behind, and the response to, suffering. I have included seven of my own thoughts that I find helpful as well as links to a few highly recommended resources.
Seven Thoughts on Suffering:
God is entirely sovereign over absolutely all suffering. He works "all things" according to the counsel of His will (Ephesians 1:11). Even if Satan's hand is behind your suffering (as it was in Job's case), God's hand is still involved (notice that God recommends Job and places boundaries on Satan's ability to inflict harm). It is not either/or. See Does God Ordain Evil? by Matt Chandler for more on God's sovereignty over and use of evil to accomplish His good and holy desires.
All things exist for the glory of God and thus in some way God is glorified even in our suffering. Reread John 9 or the account of Lazarus in John 11 where Jesus intentionally delays His arrival so that Lazarus would die. Notice that the text says that this was motivated by His love and desire for His beloved to see God's glory. It is better to suffer and see the glory of God than to continue in ignorant bliss.
All suffering is a result of sin's origin with Adam's first transgression. His sin has fractured all creation, but it will be restored one day (Romans 8:18-25). Therefore we can confidently say that tragedies are a result of sin, but as in John 9, we cannot look at the individuals afflicted and necessarily conclude that it was their direct sin, which precipitated the disaster (see Luke 13:1-5).
Suffering will work to conform us to the image of Christ (Romans 8:28-29). J.I. Packer ""Still He seeks the fellowship of His people and sends them both sorrows and joys to detach their love from other things and attach it to Himself."
The proper response to suffering is faith and even joy. Rather than anxiousness, we should be growing in trust. Rather than despair, we should be growing in joy (Romans 5:3-5). Trust that this is God's good hand upon us and that He is a generous Father. All of His works toward His children are good. See this excellent and yet challenging article on Piper's thoughts after he was diagnosed with cancer on how to not waste it.
All suffering is covered by the suffering of Christ. He was called one who was acquainted with grief (Isaiah 53:3) and He is able to help and sympathize with us in our suffering because of His own (Hebrews 2:5-18).
Soon and very soon there is coming a day free from suffering for those who have trusted and rejoiced in Christ. Believe this hope...in it...rest in it.
Revelation 21:3-4 And I heard a loud voice from the throne saying, "Behold, the dwelling place of God is with man. He will dwell with them, and they will be his people, and God himself will be with them as their God. 4He will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.
Job 13:15 Though he slay me, I will hope in him