Below is my answer to the Quora question "Where in the bay area should I live to be part of the startup action?" And below that is an interactive map put together by Garry Tan. It's terrific and has notes on each community in San Francisco, Mountain View, Palo Alto, Berkeley, etc. I hadn't seen it - but worth playing with. The two major hubs of entrepreneurial activity are: SOMA in San Francisco (5th street and north, Market street and east), and Downtown Palo Alto
If you want to be around "the startup action", find a place in either of these hubs. So many start-ups are based in these areas because the train is accessible, the areas are walkable, and it consequently helps with recruiting.
For what it's worth: I've lived in both areas. They are equally great.
View Garry's SF Guide to Where Your Startup Should Be in a larger map