Halloween was an Earth holiday celebrated on the evening of October 31st. It was a holiday that celebrated witches, ghosts, mumbo jumbo, and other monsters that go bump in the night. It also allowed celebrants to dress up in costumes to trick or treat.
In 2267, alien explorers Korob and Sylvia, attempting to understand our galaxy, constructed a castle, garbed themselves as a wizard and sorceress, and used other imagery that suggested the holiday of Halloween to James T. Kirk and Leonard McCoy. Spock later theorized that the aliens attempted to telepathically scan the landing party, and "missed", somehow retrieving information from the subconscious fears of the explorers. (TOS: "Catspaw")
In 2364, when Jean-Luc Picard first entered his Dixon Hill holonovel, based on Earth in 1941, he was still wearing his Starfleet uniform. As a quick cover for his unusual attire, he explained to Jessica Bradley that he had "lost a bet". She replied, "Oh well. At least you're ready for Halloween" – a term Picard was not familiar with. (TNG: "The Big Goodbye")