Biblically speaking, there is not always a direct one-on-one connection between sickness and sin. Jesus made that point to his disciples in John 9:3 when they asked him about the relationship between sin and a particular blind man. In that case "neither this man nor his parents sinned," said Jesus, "but this happened so that the works of God might be displayed in him." But while not always a direct one-on-one relationship, the larger theological message of the Bible affirms that there is always a general connection between sickness and sin. Sickness is part of the human experience because human beings are sinful and under the judicial curse of God. This is why the ultimate cure for sickness, as for all the tragic side effects of sin, is the redeeming work of Jesus. And so as Isaiah the prophet said: "by his wounds we are healed" (53:5 cf. Matthew 8:17).
In Ecclesiastes 7:2-4 the "teacher" (cf. 1:2) says: "It is better to go to a house of mourning then to go to a house of feasting, for death is the destiny of everyone; the living should take this to heart. Frustration is better than laughter, because a sad face is good for the heart. The heart of the wise is in the house of mourning, but the heart of fools is in the house of pleasure." While the teacher's words might appear morose to our giddy generation they contain a wisdom imparted by a biblical worldview. It is only as we believe what the Bible says about this present life and the one to come that we will understand what motivates the teacher.
In the kind providence of God -- which is just another way of saying -- because God is kind in the way that he orders our lives -- times of sickness, suffering and pain can be spiritually beneficial. They remind us that we are not invincible super-persons who can go from strength to strength without missing a beat. Our times are in God's hands and unless he upholds us we are pathetically weak. They also teach us that we should be thankful for every moment that he gives us and we should do as much as we can with the time that we have. We simply do not know what tomorrow may bring. And whatever our circumstances we should never get too settled with the way things are because nothing ever stays the same for long. We are pilgrims in this world. Each day has enough trouble of its own. Final rest comes when we are safe in the arms of Jesus in the place he has prepared.