San Francisco can be a great city for children and families - it's fairly small, there are lots of physical and outdoor activities... and many SF adults have playful childlike tastes in fun :)
For outdoor activities with children, Golden Gate Park rules them all with great walking and biking, a phenomenal science museum, playgrounds (including an antique carousel), many lakes, and at the western edge, a big beautiful beach! Crissy Field and Baker Beach are also great outdoor spots for kids... especially when the fog plays nice.
Other simple and cheap activities include taking a ferry across the bay to Sausalito, Tiburon or Angel Island (Alcatraz is considerably more expensive and often requires advance purchase). The Cable Cars are open air and fun, and the Cable Car Museum can be fun for kids (and free). In and around the Mission, an ice cream is battle rages (?) between Bi-Rite Creamery, Humphrey Slocombe, and Smitten... among others :)
Museum-wise, the Exploratorium (across the street from Crissy Field) and Zeum successfully orient towards children. (Interestingly, the Walt Disney Family Museum does not especially).