The main tourist season in Rome starts shortly before Easter (when the greatest number of visitors flock to the city) and runs through October. In July and August, come if you like, but learn to do as the Romans do -- get up and out early, seek shady refuge from early afternoon heat, take a nap if you can, resume activities in the late afternoon, and stay up late to enjoy the nighttime breeze. During August many shops and restaurants close, and on the August 15 holiday Rome is a ghost town. During the winter months, especially January-March, you have a better chance of getting into the major tourist attractions without having to wait in line.
Spring and fall are the best seasons in Rome, as far as the weather goes, though tourist attractions are crowded. It's neither too hot nor too cold, there's usually plenty of sun, and the famous Roman sunsets are at their best. Summers can be sweltering -- recent ones have been among the hottest and driest on record. Roman winters are relatively mild, with some persistent rainy spells.