Experience tells me, what I am about to share with you will cause some of you some anguish. However, since my commitment in writing is to be boldly scriptural, I'm going to tell you what I think is scripturally true come what may. So give this a read, and if it upsets you, leave a comment. We'll talk.
In dealing with in the subject of sickness from a scriptural perspective, there is no avoiding the fact that Paul and James both connect sickness to sin in their Holy Spirit inspired writings. Paul does so quite directly, James merely implies it, but both connect the two beyond a shadow of a doubt. Neither offers the correlation that if one sins, one consequently becomes ill, but there is cause and effect in some cases. James nebulously mentions that if a sick person has sinned he will be forgiven in the process of healing (causal link implied), but Paul specifically mentions the sin of eating and drinking from the Lord's table in an unworthy fashion as leading to sickness (and even death).
The concept is nothing new. We looked into God's ancient pattern of governance earlier in the series to establish that God wanted his people well. If we look there again, we'll see that the sin and sickness connection is long established under the rule of God. Isaiah said that sin puts us at odds with God, even out of earshot, which goes a long way toward explaining why sickness can follow sin in a believer's life. If we need to ask for healing, which is what I have asserted, and sin interferes with our ability to be heard by God; certainly, sin could effect our ability to receive all that God has made available to us.
For those of you who would have trouble envisioning God making us ill, let me point out that he would not have to act directly against us for sickness to follow sin, he would merely have to leave us to our lot. This concept may put a chill down your spine, but don't let it get you down, even though death is part of the possibilities that Paul brings up. James makes it clear, that if sin is associated with the sickness someone is experiencing, it will be forgiven him when he calls for the elders and the church prays for him. Mistreating your brothers and sisters may bring illness your way, but calling on those brothers and sisters to pray for you can bring forgiveness and healing.