Charles M. Schulz Sonoma County Airport: The closest airport, but still about a 45-minute drive from Sonoma outside commute periods. Rent a car if you will visit wineries; otherwise pre-book a car service or arrange a ride through your hotel. A taxi/rideshare can be roughly $80–130 each way, and app-based pickup is not something to count on late at night.
San Francisco International Airport: The sensible transfer is a rental car or pre-booked private transfer: roughly 1.5 hours in clear traffic, but 2+ hours is entirely plausible around Bay Area commute periods. Route south/east via Highway 37 and then State Route 121 into Sonoma Valley. Public transport involves multiple connections and is a poor use of a short Sonoma stay; a private car commonly runs about $180–300+ one way.
Oakland International Airport: Use a rental car or pre-booked transfer. Allow roughly 1.5–2 hours, traffic dependent; it is often easier than SFO if Bay Bridge/San Francisco traffic is unfavorable, but it is not a cheap or practical public-transit trip to Sonoma. Expect private-transfer pricing broadly similar to SFO.
Sacramento International Airport: A rental car is the only genuinely good option: allow about 1.5–2 hours, longer in peak traffic. It can make sense only when airfare or flight schedules are substantially better; Sonoma has no rail station or easy airport shuttle connection.