We live in the Bay Area, and my DD4 and DD2 LOVE going into the city for the day. We never run out of fun things to do.
One of our favorite food stops is the Ferry Building. We much our way through. The girls love empanadas (a small stand near one of the entrance doors) and ice cream from the Cowgirl Creamery. Then, they enjoy meandering down Embacadero, stopping to enjoy the sites along the way. The Exploratorium is a really fun stop. There's a small playground right before Pier 39 (outside the aquarium) that's a fun stop for kids to stretch a bit and play. My girls love the little house made of vines. Pier 39/Fisherman's Whatf have a double decker carousel, an old time Penny Arcade, a mildly interesting aquarium (you can typically get discount coupons; we have an Oakland Zoo membership and get a discount, so if you have a zoo membership, bring it with you), and fun snack food stops like Trish's Mini Donuts and Nestle Tollhouse cookies. We used to despise touristy Pier 39 and Fisherman's Wharf, but our kids really love it there, so we have learned to enjoy it for them.

We typically eat at Boudin's, but we gambled on a relatively new restaurant down there because our DD2 was about to fall asleep, so we weren't going to be able to drive or walk to North Beach, our typical fallback plan. We were very pleasantly surprised. It's right across from the aquarium and had beautiful views if you can get table side. The food was really good, which we have found to be a rarity in that area. It's called Fog Harbor Fish House. We would definitely go again. We also like the Maritime Museum area on a nice day to play on the beach, then head up to Ghiradhelli Square for ice cream. If you want to ride a cable car, you can do so here as well, but be prepared for a very long wait.
Other touristy items with a young kid I would recommend: Coit Tower- beautiful views and the pictures on the bottom are pretty. Bring pennies to let her try to slide through the windows. Not sure why that is so fascinating to kids, but it is. Chrissy Field with a kite and a picnic lunch. You'll love the views, she'll love flying a kite. The SF Children's Museum is actually geared towards older children. We took ours and they were too young to really enjoy it. Golden Gate Park has no end of fun things to do! The Japanese Tea Garden is always a hit for little kids, and don't miss out on stopping for a cup of tea afterwards. Right across from there is the newly redone SF Academy of Science. It gets very busy, so I highly recommend arriving there first thing, then popping over to the Tea Garden. It's definitely worth it though. We had a membership last year and thoroughly enjoyed it. Food is also quite good at the caf or the nice restaurant there. Also in Golden Gate Park, you can search out the Buffalo Paddock or the windmills. Stop off at Sunset Beach to play in the sand and eat at historic Cliff house and then climb down to the ruins of the Sutro Bath Houses. There's an amazing walking trail there that goes all the way to the Golden Gate Bridge. You can just walk a portion and still get stunning views. A little ways down that walk is the USS San Francisco Memorial. There's also the San Francisco Zoo, although we prefer Oakland. Playland-Not-At-The-Beach could also be a fun option and is a San Francisco tradition going back a long time.
Across the bay is Sausalito and Muir Woods, personal favorites of my family. You can take a ferry over, which we have now done with visitors so many times my DDs do not enjoy it anymore, but they originally loved it. Sausalito is very walkable. If you drive, there's a great Children's Museum at Fort Baker with views that I just stare at while my kiddos play.
I have more if that's not enough.

San Francisco is such an amazing place with kids. We have actually found ourselves exploring even more with them than we did on our own.