The high season is July and August, when the town is crowded with Bulgarian and Eastern European holidaymakers and the beaches are full from morning until evening. It is fun if you like a busy resort and stifling if you don't.
The shoulder seasons are better. May and June are reliably warm with manageable crowds; the sea reaches swimmable temperatures by mid-June. September is the best month: warm sea, quiet beaches, and the Apollonia Arts Festival in the first ten days, which brings theatre, music, and film to outdoor venues in the Old Town. Book accommodation early if you are coming for the festival.
Winter is largely closed. Many restaurants and hotels in the Old Town shut between November and April. The town is still atmospheric off-season — the cobbled lanes are deserted and the sea is dramatic — but you will need to plan around limited options.