The Bible gives lots of reasons and truths about illness/sickness. Ultimately the answer is God. He is the God who sends disease (Exodus 15:26), and He is Jehovah Rophe, our Healer (Exodus 15:26). Why he sends the disease is not always because of sin, although many times in Scripture it is.
God plagued the Egyptians with sickness as a judgment (Ex 15:26).
David’s son was sick because of his own sin (2 Sam 12:15).
Jeroboam’s son became sick and died as a mercy from the Lord to spare him from the judgment coming upon his father’s household (1 Kings 14:12-13).
Naaman’s physical trial led him to the one true God (2 Kings 5).
The leprosy of Gehazi was given as a judgment for sin (2 Kings 5).
Even Elisha became sick and died though he had the power to do the miraculous (2 Kings 13:14).
The man born blind was born that way so that Christ could be glorified through him (John 9). (The Gospels alone are a great source of material for this study).
Job was afflicted physically by Satan with the Lord’s permission (Job 2:7).
Sickness in the Corinthian church was evidence of sin by eating the Lord’s Table unworthily (1 Cor 11:30).
Lazarus’ sickness was for the glory of God (John 11:4).
Paul’s sickness enabled him to preach the gospel to the Galatians (Gal 4:13).
Paul’s own thorn in the flesh seems to have been a physical ailment to keep him from pride (2 Cor 12:7).
Hezekiah became sick and was told that he was going to die. His prayer to God was answered and he was healed (Isa 38). His prayer is an excellent argument with God (in a good sense) for continuation of life. He argued that the living give thanks and teach their children about God’s faithfulness. He also intended to worship the LORD with his own songs in the house of the LORD. God’s healing would enable him to write songs that could bring more praise to the Lord (Isa 38:20).
In light of the evidence, it seems that the best application is that God sends sickness and affliction for different reasons. For myself and others, I ought not to assume that sickness or death are due to sin, though they could be. For Paul his sickness turned him to prayer (2 Cor 12). James gives explicit instruction to do just that (James 5:13-14).