In the downtown area, restaurants at the top of hotels is probably the best suggestion (Hilton near Union Square, Mark Hopkins, Fairmont [the tower part]).
Or on a dinner cruise of one of the
Hornblower cruises.
Near (but not really in) downtown, I would suggest the top of Coit Tower at the top of Telegraph Hill.
Further from downtown, but other great places:
--
Golden Gate Park (several locations there in)
-- Vista Point across the Golden Gate Bridge (Marin County, looking back at The City)
--
Fort Point at the base of the Golden Gate Bridge on the SF side
-- Treasure Island (looking back at The City)
-- Top of Mt. Tamalpais or down in Muir Woods in Marin County
-- Angel Island in San Francisco Bay (ferry from Tiburon/Belevedere)
Of course, all of these are basically contingent on the fog having NOT rolled in!
Good luck!