Praise be to Allah
What we think and advise in such situations is that you should adopt a moderate approach, because moderation is the key to success in relationships between individuals and societies, and it is one of the most important methods of modern education, especially nowadays when there is a great deal of openness and people are in close contact with one another because of means of social communication. Therefore imposing restrictions and banning contact does not lead to the desired results as much as a moderate approach may.
One of the most important ways of achieving a moderate approach in this matter is to take into account the age of the girl and the extent to which she will be influenced by her grandmother. If she is very small, such as if she is an infant who is still being nursed and the like, and she will hardly be affected by the attitudes and character of people with whom she spends a short amount of time, then in that case cutting off ties between the grandmother and her granddaughter will not serve any purpose, and will only increase the rift between you and her; this is not good, especially for her son who should honour her and treat her kindly. But if your daughter has reached the age of discernment and has started to learn from the people around her, then there is obviously some risk in letting her visit her grandmother or spend lengthy periods of time with her, without anyone to keep watch over her. In that case she may see her when she is consuming intoxicants or smoking hashish, and curiosity may motivate her to imitate her grandmother in these evil deeds, or at least to wonder about how much pleasure she gets from consuming these things, which may create in her an inclination towards sin and lead to a conflict in her mind between the advice and religious practices of her parents, and what she sees of sins committed lightly by her grandmother. In that case, nobody can guarantee that the girl will follow the path of guidance, and no one has the power to ward off whispers and bad thoughts in her mind; then there will be the fear that the parents will bear some share of the burden of that sin, because the child is a trust that is entrusted to the father, who is obliged to protect and take care of that trust that Allah has given to him. A wise man said: The best that parents may give to the children is praise, good manners and righteous friends.
See: al-Adab as-Sagheer wa’l-Adab al-Kabeer (p. 34)
If you do decide to let your daughter visit her grandmother, then that should be done in your presence or in the presence of your husband, so that you will be safe from any kind of influence on your daughter, and you can take her away from the place if any harm or trouble arises, such as if the grandmother smokes near her, and the like.
At the same time, all of this does not mean that you should cut off ties completely with that woman; rather we advise you to continue to keep in touch with her and treat her kindly, for the Muslim should be a daa‘iyah (caller to Allah) in all situations, and he should never despair of anyone being guided. It was narrated from Abu Hurayrah (may Allah be pleased with him) that a man said: O Messenger of Allah, I have relatives with whom I try to keep in touch, but they cut me off. I treat them well, but they abuse me. I am patient and kind towards them, but they insult me. He said: “If you are as you say, then it is as if you are putting hot ashes in their mouths. Allah will continue to support you as long as you continue to do that.” Narrated by Muslim (2558).
Moreover, grandchildren are required to honour their grandparents in general terms. Although parents are more entitled to that honour, one should not cut off ties with the grandparents, even if they are disbelievers; in fact they have the right to be honoured and for ties with them to be upheld, commensurate with the degree of one’s ties with them, because of the general meaning of the words of Allah, may He be glorified and exalted (interpretation of the meaning):
“But if they (both) strive with you to make you join in worship with Me others that of which you have no knowledge, then obey them not, but behave with them in the world kindly, and follow the path of him who turns to Me in repentance and in obedience. Then to Me will be your return, and I shall tell you what you used to do”
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
The grandfather and grandmother have the right to be honoured, but that is not equal to the honour that is due to one’s mother and father, because the grandfather and grandmother did not endure what the mother and father endured of exhaustion, care and supervision. But honouring them is obligatory, and comes under the heading of upholding ties of kinship. But the highest level of honouring is due to the mother and father.
End quote from Makaarim al-Akhlaaq (p. 40)
And Allah knows best