Judy is right, there are lots of choices, and it depends on the factors she listed. It also matters where in Boston you would be committing to, and whether you wanted to take public transit or drive. There are several commuter rails that go into the city, but each ends in a different area, so you would want a town with the right train. The T goes everywhere in the city, but doesn't extend far out except for a few lines. If you are planning on driving, then you have to factor in where you could park and what the traffic is like on your route.
So, not exactly an answer to your question, but it would be misleading to list towns without more info!