Visiting the sick is a highly important action and responsibility in the Muslim tradition.
Prophet Muhammad (pbuh) mentioned it as one of the six rights of a Muslim over another Muslim. (Ibn Maja)
Here are two hadiths on the importance of visiting the sick:
“One is walking in the gardens of Paradise when visiting the sick until he/she returns.”
“God, The Lord of Honor and Glory, will say on the Day of Judgment: ‘Son of Adam, I was sick and you did not visit me.’ The man will say: ‘My Lord, how could I visit You and You are the Lord of the universe!’ God will say: ‘Did you not know My servant so and so was sick and you did not visit him? Did you not realizethat if you had visited him, you would have found Me with him?” (Muslim)