Tommy's Mexican is the place for margaritas, but I hesitated to mention it because it's way out in the boonies.
(Not really. Geary and 25th. Not exactly a hotbed of activity... but 20 blocks closer to civilization than my house!)
I can actually recommend about a dozen places in that neighborhood (Richmond District), if you're planning to be there. It's a good area to visit after spending time in Golden Gate park, Ocean Beach, or the Legion of Honor. Plenty of good restaurants (many Asian, but I also have a favorite Italian place on Clement street) and the bars are mostly Irish pubs.
I also thought of a restaurant on the Peninsula you might want to try -
Shiok in Menlo Park. I used to eat there like once a week when I worked in the area. Very yummy food, with flavors unlike any I've tasted elsewhere (even at other Singaporian restaurants).