We have had this same question a couple of times before. I'm surprised those threads did not come up on the "Similar Threads" at the bottom of the forum page.
Having lived in Sacramento, and gone MANY times toward the coast on Highway 12 (or Hwys 37/101/12) . In my opinion either way is fine.
Advantages/disadvantages of Hwy 12 route from I-80: First section on Hwy 12 West from 80 was still 2 lane when i was there, but they were in the process of making this 4 lane. Pretty drive through hills, farms and vineyards to Hwy 29 where you go North for a bit. One bit of a short grade going over the Napa river until you get to the Hwy 12 West cutoff from Hwy 29 in Napa. Next section mostly 4 lane through rolling vineyard hills. Last section (left turnoff) to Petaluma on Hwy 12 2 lane all the way into Petaluma. 2 lane on Hwy 12 on narrow 4 lanes through downtown Petaluma west towards the dairy country outside Bodega Bay.
The highway 37 route from Vallejo requires you to go another 7 miles on I-80, and you go up a good grade just before you get into Vallejo. The Hwy 37 turnoff ramp is at the base of the downgrade, so be ready. This road is pretty good 4 lane through Vallejo and Mare Island, but then was a long 2 lane stretch along the North end of San Francisco Bay (Past my old NSG Base of Skaggs Island) up to the Sonoma Raceway turnoff (and a stoplight). It then goes over a short hill and on to old Bay flatlands to and another hill to Novato. Maybe they have 4 laned the Skaggs island stretch by now- it used to be a real traffic slowdown, and a "death alley" that Caltrans did all sorts of stuff to end the unsafe passing and accidents. When you get to 101 at Novato, you will go North on 101 for about 12 miles to Petaluma on 4 lane high speed highway. Once you reach Hwy 12 in Petaluma, you go through the same narrow 4 lane downtown section like the other route.
Have a great time in Bodega Bay and maybe see the town of Bodega nearby that has an old-time iconic country Catholic Church that both Alfred Hitchcock and Ansel Adams featured in their work.