One of the great theological struggles has been finding a proper understanding of the relationship between sickness and sin. Many ancient peoples understood sick as direct punish from God for sin, and there are passages in the bible to support that. Even our current theology around the anointing of the sick can be misread by some to encourage that belief. In the Catholic Church only a priest can give the sacrament of the anointing of the sick, because it also brings the absolution from sin.
The Catholic answer is neither a simple yes or no. God like any good parent allows us to experience the consequences of our own bad choices. My own little bought with skin cancer, reminded me how we used to cover ourselves in suntan oil and lay out trying to tan. We knew it wasn't good for us, but we did it out of vanity. One of our priests dies of a heart attack when he was about the age I am now. He was loved by his parishioners, but those of us who knew him remember the car filled with old fast food bags,and the yo-yo dieting— choices. Even the collective choices, the environment, food processing, etc. impact individual health.
Are their some illnesses that are unexplainable? Of course, as one born with cerebral palsy I would be a fool to say it is all explainable. I would also be a fool to see it as punishment. My CP is part of what has made me the person I am. In that sense it was a gift.
Is some sickness the result of sin? yes, some is the natural consequence of bad choices. Is all of it? no.
What is true of all illness is that God can transform any illness. Even when God doesn't make it go away, God can transform it into a source of life and strength not only for the sick individual but for those around them.