How much time should you allocate for the trip? ...
Actually, I think the constraint will be how long of you have. I think BiggestBopper outlined the stops quite nicely. Funny that he points out the college campuses as waypoints in the Bay Area (don't get me wrong, they're great places to visit!)
Definitely take up his advice and not make the drive in just one day. I'm sure you will able to find some nice Bed and Breakfasts along the way.
As for SF, if at all possible, try to stay near a BART station. Although you have a car, it might be easier to get to places if your near BART. Parking in SF (and for that matter, here in Berkeley) can be tough. That being said, I would suggest either a place in SF if you can spring for it, but if not, I would suggest Walnut Creek as a good backup. Those are least sketchy places for a visitor along the line.
To add to the Cal campus recommendations, go up the Campinilie, our campus clock tower. IIRC, its only $1 per person per visitor, but on a clear day, you get a beautiful bay view. At the base of it, its fun to just sit and watch the sunset on its steps looking out onto the bridge.
So basically, I would say at least a week easy for LA-SF and stops in between. If you lay out what you'd like to check out, we could probably give you a better estimate. I think this board is full of residents who've lived in both LA and SF (or at least a bunch of So Cal Stanford and Cal students/alums or Nor Cal UCLA and USC students/alums)