Actually, the BART system doesn't go to San Mateo at all--it ends up near the San Francisco airport and Milbrae.
I think HngryTrvlr is confusing the BART with the CalTrain--which does go to San Mateo.
http://www.bart.gov/stations/index.aspx
http://www.visitingdc.com/airports/san-francisco-caltrain-map.asp
To get to San Mateo (or to Sunnyvale) via public transportation, take the BART system to the Milbrae station and then transfer on to the CalTrain system and go to the station selected.
As far as traveling via freeway from SF to Sunnyvale--you will hit traffic in the morning if you take the US Highway 101 freeway which goes through San Mateo--but you won't hit traffic if you take the I-280 Freeway (which is just a bit farther west).
I agree that hotels will be cheaper in either San Mateo or Sunnyvale than they will in San Francisco, but there isn't anything to see in either of these two places--which is the reason for the difference in prices.
Enjoy