The MBTA (Mass. Bay Transportation Authority) has a good website that you can use to find a way into Boston using either the commuter rail (Amtrak trains) or the subway system.
www.mbta.com The commuter rail lines run up to about 35 miles out of the city and the subway lines run pretty far out as well, but still mostly inside the I-95/Rt. 128 circle, which encircles all of the type of urban roads and highways that are not friendly to bicycles. Under the "rail" section, you can click on different towns which are on the end of the lines furthest away from Boston, and you can find your way to a map that shows the train route, and then you can choose where you want to get on from there. Between the I-95 and I-495 circles around the city you will still find closely packed suburban towns but you can find roads that are more friendly to cycling as you get further away from the city in most cases, depending on where you are coming from exactly.
I think the commuter rail trains have an open section for bikes at the beginning of each car, but I'm not sure. If the line you pick doesn't go to the same station where your Amtrak train ride home begins from, the subways will connect you to it.
bringing bikes on the T info:
http://www.mbta.com/riding_the_t/bikes/