Short answer
No. Diwali is a Hindu religious festival tied to the worship of deities such as Lakshmi, so Muslims do not celebrate it, light its lamps or join its puja, in the Hanafi school or any other. You can stay kind to Hindu friends and neighbours and accept ordinary sweets they give you, but avoid food that was offered to an idol (prasad).
Joining Diwali celebrations or rites is haram, and doing so to honour the festival endangers one's faith. Ordinary sweets and gifts given out of friendship may be accepted. Food offered to idols should be avoided, and meat slaughtered for other than Allah is haram. Congratulating someone on the festival as a religious occasion should be avoided.
The four schools agree on this.
Explanation
Diwali, the festival of lights, is one of the main Hindu festivals. It is linked to the return of Rama in Hindu tradition and to the worship of the goddess Lakshmi, with lamps (diyas), puja and offerings. Because it is bound up with worship of other than Allah, it is not a festival a Muslim can share, however beautiful the lights. The Quran's answer to other faiths is clear and calm: "For you is your religion, and for me is my religion."
Islam also forbids insulting what others worship, and asks for kindness and justice toward peaceful neighbours. So the aim is respect without participation:
- Sweets (mithai): if a neighbour or colleague gives you a box of sweets as a gift, you may accept and eat them, as long as they contain nothing haram.
- Prasad: food that was first offered to a deity should be politely declined.
- Happy Diwali: avoid congratulating people on the festival. Say something kind instead, such as "Wishing you and your family good health and happiness."
- Lamps, rangoli and fireworks: do not light diyas or decorate for Diwali.
- Office celebrations: sharing a halal lunch is fine; stay away from the puja or any prayer.
Many Muslims in India, Pakistan and the UK live alongside Hindu families. Good neighbourliness, honest friendship and help in hard times are part of Islam all year. Muslims have their own festivals in the two Eids. See also can Muslims play Holi? and what Islam says about Hinduism.
The evidence
Quran, Surah Al-Kaafiroon 109:6
لَكُمْ دِينُكُمْ وَلِىَ دِينِ ﴿٦﴾
For you is your religion, and for me is my religion."
Muslims respect others' freedom of worship without joining it.
Quran, Surah Al-An'aam 6:108
وَلَا تَسُبُّوا۟ ٱلَّذِينَ يَدْعُونَ مِن دُونِ ٱللَّهِ فَيَسُبُّوا۟ ٱللَّهَ عَدْوًۢا بِغَيْرِ عِلْمٍۢ ۗ كَذَٰلِكَ زَيَّنَّا لِكُلِّ أُمَّةٍ عَمَلَهُمْ ثُمَّ إِلَىٰ رَبِّهِم مَّرْجِعُهُمْ فَيُنَبِّئُهُم بِمَا كَانُوا۟ يَعْمَلُونَ ﴿١٠٨﴾
And do not insult those they invoke other than Allah, lest they insult Allah in enmity without knowledge. Thus We have made pleasing to every community their deeds. Then to their Lord is their return, and He will inform them about what they used to do.
Muslims must not mock what others worship.
Quran, Surah Al-Mumtahana 60:8
لَّا يَنْهَىٰكُمُ ٱللَّهُ عَنِ ٱلَّذِينَ لَمْ يُقَٰتِلُوكُمْ فِى ٱلدِّينِ وَلَمْ يُخْرِجُوكُم مِّن دِيَٰرِكُمْ أَن تَبَرُّوهُمْ وَتُقْسِطُوٓا۟ إِلَيْهِمْ ۚ إِنَّ ٱللَّهَ يُحِبُّ ٱلْمُقْسِطِينَ ﴿٨﴾
Allah does not forbid you from those who do not fight you because of religion and do not expel you from your homes - from being righteous toward them and acting justly toward them. Indeed, Allah loves those who act justly.
Kindness to Hindu neighbours and colleagues is encouraged.
Sunan Abi Dawud 4031
Graded hasan sahih... من تشبه بقوم فهو منهم ...
"Whoever imitates a people is one of them."
Taking on the religious rites of another faith is to be avoided.
Where the ruling is recorded
- al-Fatawa al-Hindiyya, Kitab al-Siyar, the chapter on the rulings of apostates, words of kufr about the festivals of non-Muslims. Joining or honouring the festivals of idol worshippers is a grave matter.
- al-Bahr al-Ra'iq, Kitab al-Siyar, Bab Ahkam al-Murtaddin. Gifts given to honour a non-Muslim festival endanger faith.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.