I would say Sonoma is closer. It takes about 45 minutes to get from SF to Sonoma. What are you looking to do? Do you have a special wine/winery that you like? Sonoma has a small town feel. Well, it is a small town. LOL! You can walk the plaza (square in the middle of town) and wine taste as well as drive to visit wineries. If you have small kids, there is a place called Train Town that is packed every day that it is open. On Tuesday nights, a farmer's market is held on the plaza and is very popular too. Let me know if you have anymore questions!
Pam