
Before you can fight the enemies of the Pumpkin Moon you need to start it. The event is triggered by using the item the Pumpkin Moon Medallion. This is an item which can be crafted after the Hardmode Jungle boss Plantera is defeated.

The Pumpkin Moon Medallion requires three items; 30 Pumpkins, 5 Ectoplasm, and 10 Hallowed Bars combined at a Mythril or Oricalcum Anvil.

Pumpkins can be obtained by breaking Pumpkin background objects. These will spawn naturally in worlds during the month of October and can be created manually with Pumpkin Seeds bought from the Dryad NPC.

Ectoplasm is an item which drops from Dungeon Spirits. Enemies which spawn when enemies in the Dungeon are killed only after Plantera has been defeated. The Dungeon Spirits themselves are easy to kill but the Dungeon enemies they spawn from are far more difficult to take down.

Hallowed Bars are a material dropped by the Mechanical Bosses. Defeating the Destroyer, the Twins, or Skeletron Prime will reward you with 15-30 bars.
Once you have the Medallion, wait until nighttime and use it to begin the event.