The city sits near sea level on the Bay of Naples, with Vesuvius behind it. It is not a mountain climate. Days are Mediterranean. The thing that changes the visit is sun on open streets, and how early the gates close.
Summer heat
June through August are the hot months. Afternoons often reach around 30°C, and the streets have little shade. The 9:00 opening is the comfortable part of the day. By early afternoon the stone is hot and the forum is full. That is a pattern, not a forecast for your date.
The milder months
From October through March the days are milder, often in the mid-teens Celsius, and rain is more common. The short season ends the visit earlier: last entry is 15:30 and the gates close at 17:00. A shower does not close the city. Wet paving is slippery, including the stepping stones.
What to do with that
Bring a hat and water in the warm months, and a shell in the wet ones. Spring and early autumn are the months when a full morning is easiest. We do not control the weather, and a named ticket does not move if the day turns wet. The train from Naples can run late in heavy rain. Give it time. The date on the ticket stays where it is.
More to read

When to visit Pompeii
Pompeii is open almost every day. The useful split is heat, rain, and the season’s last entry, not a month when the gate locks.

What to wear and bring to Pompeii
What to wear and bring to Pompeii: shoes with a tread, sun protection, a small bag, and the ID that matches the ticket.
