Monaco's glorious climate, favoured by the famous for over a century, means that there isn't a "bad" time to visit.Spring and Autumn are arguably the perfect times to go, warm enough to visit the beach but outside peak season. Here is some addition information if your are planning to visit at other times of the year:

May or preferably June are good if you want to swim (still chilly, though). You may want to avoid the Formula 1 Grand Prix week (usually in May, but check as it changes every year) unless you are a big racing cars fan. Many of the Monaco streets are blocked because they are part of the circuit and there are grids everywhere.

July and August will see temperatures cruise above 30C, and coupled with the huge crowds of tourists this can be an uncomfortable time to visit.

Even in winter, when temperatures will struggle to fall below 10, it's mild enough to walk around in light(ish) clothing.