Late September through mid-October is the best time to visit Amherst. The Pioneer Valley's autumn foliage is among the finest in New England — the surrounding hills turn orange, gold, and red in succession over about three weeks — and the temperatures are still mild enough to walk the rail trail and the campuses comfortably.
May and early June are the next best time: lilacs in bloom on Main Street, Dickinson's garden at its most photogenic, and the students still in residence. The Emily Dickinson Festival runs in August and brings readings, scholarly talks, and themed walks.
Winter is genuinely cold — snow on the ground from late December through March is normal — but the campuses are pretty under snow and the museums are uncrowded. Summer is hot, humid, and quiet, since the students are away; aim for early or late summer if you come then.