One way into Sonoma is via the Russian River, which comes out at Highway One. You can ride north from SF, up through Bodega Bay (location of the movie The Birds) and turn right at Jenner. Then, following the Russian River inland you can make your way to Santa Rosa (a big town) and then down into Sonoma. Note that there are mountains between the Sonoma and Napa Valleys (that is why they are valleys!), so keep an eye on the elevations when you plan your route.
Riding north on the coast will be heading into the wind as the day progresses. Either ride early or prepare yourself mentally for the effort. In addition, while there is a vibrant biking community in both Napa and Sonoma, the bike routes are few. Also, there aren't all that many roads and many carry heavy traffic with limited shoulders.
Suggest you contact
https://www.eaglecyclingclub.org/ for Napa information and
https://www.srcc.com/ (Santa Rosa Cycling Club) for Sonoma.