This episode takes place in 2125.
The government restrictions spelled out (no vampires, no ghosts, etc.) are similar to the rules established by the Comics Code Authority in the 1950s as a pushback against horror comics, particularly those EC Comics titles like Tales From The Crypt.
The original Bradbury story took place on Mars, as part of his 'The Martian Chronicles' anthology. The location here is left nameless.