April, May, late September and October are definitely the best time of year to visit Rome. You'll avoid the crowds of Summer and find that most of the things to do in Rome are still open. At the very least, avoid August if you can.
We also found that Mondays were the busiest days for tourists, as most of Rome's attractions are shut on Sunday. Bear this in mind when planning what to do during your stay.