You're considering the following counties: Yolo, Solano, Sonoma, Napa, Marin
Marin county has all the best school districts, is close to culture and has the most beautiful setting, but also the most expensive. A bit far from the mountains, but closest to the ocean. Best road/mountain biking areas.
The next best school district is in Davis, Yolo county. It's in the middle of the valley, so the climate is not favorable and it's far from SF, but it has a lot going for it in terms of the university, culture, and closeness to the Sierra.
The best school district in Solano county is in Benicia. It's on the shore of the Bay and has ferry link to SF via Vallejo. Has a quaint waterfront area. It's close to I-80 so traveling to mountains is relatively easy. Real estate prices are mid-range.
Napa and Sonoma counties are the famous wine country, have a beautiful setting, fairly expensive, and don't seem to have great school districts. Traveling to both mountains or SF aren't easy. Probably won't be your first choices.
Other than the above, potentially you can look at the East bay (Contra Costa and Alameda counties), much closer to SF, a few good school districts, a bit less expensive than Marin but still high, and surprisingly closer to Yosemite than the other counties.
see school district rankings below: