My rule is that I live within one hour of work, which could include taking public transit.
What many people don’t consider is combining public transportation with cycling. Now there are limits, for sure, but if you can get to work in an hour using public transit and cycling, go for it.
All public transit agencies in the Bay Area accommodate bikes, but the service varies. Caltrain offers a place to store your bike on board, as does VTA (Santa Clara Valley Transportation Authority) light rail in the South Bay, but BART doesn’t allow bikes during peak commute hours. Almost all buses have bike racks. Even ferries take bikes.
For two years I took an express bus on El Camino Real between Palo Alto and Sunnyvale to get to work. Most of the time there was plenty of seating, and there was always room for my bike. Only once or twice the bus broke down or didn’t show up, so it was reliable transportation.
A benefit of taking public transit is that you have time to read, listen to music, sleep, or watch the world go by. When you’re driving you don’t have that luxury. Public transportation is also safer than driving.