the person to whom you are related by marriage—that is, by a marital tie—falls ill, it is not like the illness of someone with whom you have no such tie. Likewise, a person with whom you have a friendship is not like one with whom you have no friendship. These rights therefore vary according to the people involved.
His statement, “Visiting the sick is recommended,” apparently indicates that it is a sunnah for everyone. However, this is not unrestricted. If visiting a sick person becomes necessary in order to show dutifulness or maintain ties of kinship, then it becomes obligatory—not because of the illness itself, but because of the kinship. Thus, we cannot say to someone whose father has fallen ill, “Visiting your father is recommended”; rather, it is obligatory, because dutifulness towards him depends upon it. The same applies to visiting one’s brother, for the obligation is not due to the illness itself, but to maintaining the ties of kinship. As for someone whose not being visited would not be regarded as undutifulness or severing kinship ties, the author holds that visiting him is recommended.
Some scholars have said that it is a collective obligation: Muslims must visit their sick. This is the correct view, because the Prophet ﷺ made it one of the rights that a Muslim has over another Muslim (1). It is not befitting the virtues of Islam that one of us should fall ill and no one visit him, as though he had fallen ill in the wilderness. Thus, if we know that no one is visiting a particular man, then whoever knows of his condition and is able to visit him must do so.
Along with being part of fulfilling the rights that one Muslim owes his brother, visiting the sick fosters such affection and closeness as can only be understood by one who has fallen ill and then been visited by his brothers. He finds within himself great love for those who visited him; he feels its sweetness and speaks of it often. Thus, in addition to its reward, it strengthens the bond of affection among Muslims.