Budapest’s peak season runs from May to September, but with July and August often verging on the oppressively hot. The city does, however, have a wealth of baths that are a godsend when temperatures soar. May, June, and early September are usually ideal temperature-wise.
August is a major vacation month so be prepared to find a fair number of restaurants, bars, and shops shut.
Budapest is a good all-year destination and despite its cold winters there are plenty of indoor activities, plus outdoor novelties like skating and shopping at a Christmas market. Hotel prices are significantly cheaper in the off-season and the city is less overrun with tourists, making a strong case for an off-peak visit.