On campus, the only public transportation is the Marguerite Shuttle. Students don’t find this service particularly useful, but a lot of carless freshmen use it to get downtown or to go to the Stanford Shopping Center. Opinions on Bay Area transportation vary. Few students use the buses, but many take Caltrain to get to the airport or to San Francisco. In general, it will take at least an hour to get to the city, and it will cost about $9 round trip. San Francisco itself has great public transit, including MUNI buses and the BART subway system.
The Bay Area has a reasonably developed public transport system, but Stanford is a bit too isolated to take full advantage of it. You can take the Marguerite Shuttle downtown or to the mall, but you can’t get to a standard grocery store. Ultimately, most Stanford students realize the necessity of having a car. You can get by without having one, but expect to spend a lot of time on campus.