This issue is a very subjective matter. A lot depends on what time of day you'll be traveling, what kind of hours you'll work, and how you want to spend your free time. Are you married and/or thinking about having children? Many avid city lovers end up moving to the suburbs once they have children so you might keep that in mind as well.
I think the most important thing you could do right now to answer that question definitively one way or the other is make the commute yourself at what will be your normal work times and see if it is tolerable or not.
As for taking the train, many places in SOMA, South Beach, and Mission Bay are short walks to the CalTrain station by the ball park, as are locations in Potrero/Central Waterfront for the 22nd St Station. If city living is important to you there are many options available in terms of life style and price range.
Best of Luck,
Lance King/Managing Broker