Praise be to Allah.
Yes, it is permissible to offer them condolences at times of bereavement, to visit them when they are sick, and to console them when calamity strikes. It was narrated that Anas (may Allaah be pleased with him) said: “There was a Jewish boy who used to serve the Prophet (peace and blessings of Allaah be upon him). He fell sick, and the Prophet (peace and blessings of Allaah be upon him) came to visit him. He sat at his head and said, ‘Become Muslim.’ (The boy) looked at his father who was with him, and he (the father) said to him, ‘Obey Abu’l-Qaasim ( (peace and blessings of Allaah be upon him)).’ So he became Muslim. Then the Prophet (peace and blessings of Allaah be upon him) left, saying, ‘Praise be to Allaah who has saved him from the Fire.’”
(Narrated by al-Bukhaari, 1356)
And it was narrated from Anas that a Jew invited the Prophet (peace and blessings of Allaah be upon him) to eat barley bread and other food, and he accepted the invitation. (Narrated by Ahmad, 13201, with a saheeh isnaad).
It should be noted that if a Muslim does that, he should do so with the intention of calling them to Islam and softening their hearts towards Islam; he should call them in an appropriate manner and at an appropriate time.
It should also be noted that whilst consoling them he should not pray for forgiveness or mercy or Paradise for their dead, because Allaah says (interpretation of the meaning):
“It is not (proper) for the Prophet and those who believe to ask Allaah’s forgiveness for the Mushrikoon, even though they be of kin”
Rather he should pray for them in a way that is appropriate, encourage them to be patient and steadfast, and remind them that this is the way of Allaah with His creation. And Allaah knows best.