In Islam, Tawheed is the essence of one’s faith. Tawheed refers to believing in the monotheism of Allah and it is the core of Islam. The primary objective of Islam is to safeguard this Tawheed. By this, we mean to refrain from all kinds of shirk i.e. polytheism. We must wage a war against anything (customs and practices) that are originated from the ignorance and that violate the faith and Tawheed of a person and of a society as a whole.
What Halloween is and why is it celebrated?
Every year on 31st October millions of people dress up in costumes and get their faces painted. People usually decorate their houses with ghostly figures, pumpkins, and candles. They light the bonfires and play pranks. Nowadays people are in competition as to who looks scarier. People all around the world participate in this festival and unfortunately, many of them are Muslims.
Halloween originated from the ancient Celtic festival (Irish/Scottish/Welsh) called Samhain. It used to be the new years eve of pagan Celts and also their day of Dead. The Celts used to worship nature and believed in the spirit world. They had 300 gods among which the chief god was Sun. They celebrated two festivals revolving around the sun: Beltane, to mark the beginning of summer and Samhain, to mark the beginning of winter.

Why is this day called the day of dead?
The Celts believed that at the end of summer the god of death becomes more powerful and overpowers the sun god and on this day all the evil spirits are assembled and allowed to return home to visit the living.
Why do people dress up as demons and goblins? According to the Celt legend, if a person wears a mask or disguises his face, he won’t be noticed by the evil spirit that roams the land, as the ghost or a spirit cannot see their own reflection. So if a person is to meet a demon, the demon would not harm him considering him to be one of the equally horrible demons.
Other customs of this day include offering candies to the costumed revelers and lighting bonfires all night long.
In Christianity, this day is incorporated with the All hallows eve i.e. All Saints day. Devout Christians reject this day. They believed that the so-called gods and spiritual beings had a pagan origin and were, in fact, a clear deception. The spiritual forces people experienced on this day were real but they were because of the devil who misled people into worshipping other gods. Thus they rejected this day and all the customs associated with it including the symbols of dead and other evil creatures.
Many Satan worshippers consider this day as the most sacred and perform various sacrifices.
What does Islam say about it?
Our beloved Prophet Muhammad   issued a stern warning in this regard by stating: "Whoever imitates a people is one of them." [Abu Daawood]
With this hadith we can clearly establish that the celebration of Halloween or any other custom or practice of Kufaar are absolutely Haraam and all Muslims should avoid it. Prophet Muhammad   said: "The Final Hour will not come until my followers imitate the deeds of the previous nations and follow them very closely, span by span, and cubit by cubit (inch by inch)." [Al-Bukhari]
It is a duty of a Muslim to avoid the actions of Kufaars especially that of the idol worshippers and devil worshippers. Doing such acts not only makes a person to commit shirk but also makes him worthy of Allah’s wrath. It must be noted that when a person indulges in the haram activities that too when a person is well aware of the religion of Allah and his messenger, Allah Azzawajal doesn’t accept any good deed form that person. Even the supplications are not accepted. As can be understood from this hadith: The Prophet said: "I swear by Him in Whose hands is my life! You are ordered to enjoin good and forbid evil, or else Allah will certainly afflict you with torments. Thereafter, even your Du'aa' (supplications) will not be accepted." [At-Tirmithi]
Being a Muslim we must understand that not customs are beneficial for them especially when the history of the custom is based on idol worshipping and polytheism and that which destroys the Tawheed.
If we analyze and understand the festival of Halloween clearly, we may find that from the Islamic perspective it is the worst kind of celebration. Not only has it a pagan history but it also encourages people to dress up as dead and demon which is equally sinful. Also, the pranks and tricks played on this day have a negative impact on people and may result in some criminal situation.
If a Muslim still goes on to practice this festival outwardly for fun and acknowledges that it has a pagan history, he/she is still guilty of committing a sin of shirk. Maybe as a Muslim one might not find any bad in some customs and will participate in such customs, it will still be considered as a sin, as can be understood from this hadith.
The Prophet   said: "Every innovation (in our religion) is misguidance, even if the people regard it as something good." [Ad-Daarimi]
Muslims must abstain from the practices of non-Muslims. It is a duty of a Muslim to avoid the immoral and indecent behaviors of other customs and cleanse the community and society as a whole from such acts. One must not pave way for immoral activities just for fun. It has a negative effect on our children and they may be drawn away from the true religion of Allah. We must make following Quran and Sunnah easy for our children. We have to correct them of their misunderstandings and show them the true path.

Indeed Allah knows best.

The Prophet   said: "A person who calls another to guidance will be rewarded, as will the one who accepts the message." [At-Tirmithi]