If you're working near the Caltrain, then you could live in SF and take the baby bullet train to PA. As far as living in the peninsula goes, Palo Alto and Mt View are great. PA has nice bike boulevards with very little automobile traffic, and Mt View is also very bike friendly.
That being said, if you're using to living in a city, then SF is your best bet. Palo Alto, especially in the downtown / Univ ave area is as good as it gets in the peninsula, but you'll still probably find yourself going to SF all the time. Downtown Mt View, near Castro st, is the next best option, and I lived there for about 10 years before recently moving to SF.