Depends on what you want to do when here and what your style is. The neighborhoods that I would recommend for someone looking to hangout for a month with their friends.
Marina - Sorority type sluts, frat/bro guys, good cougar hunting at Balboa Cafe. Some great bars, and possibly the best place to stay for getting outside and hanging out on the beach or going for a run on the water.
NorthBeach - Slightly older demographic with more families, still plenty of younger folks, lots of good bars around, great Italian joints all over (the little italy of SF), close to Fishermans wharf area and walking distance to the Financial District
Pacific Heights/NobHill - Although Pac Heights and NobHill are really two different neighborhoods they both feed to the same social scenes and provide a somewhat central location in the city that puts you in striking distance of the best neighborhoods to go out in for a person in their 20s/30s (imho). A $8-10 cab ride will get you to the Mission, Marina, NorthBeach, FiDi, or out Richmond or Sunset districts.
Mission - If you're a Latino 'banger or your pants are tighter than your girlfriends and you ride a fixie then the Mission is for you. Amazing Latin cuisine, plenty of good places to hangout and grab a few drinks. Getting 7 tacos at 2:30 in the morning after boozing and dancing around 16th and Valencia is the shit that night and the next morning
Outer Sunset/Richmond - If you want to be a few blocks from the Pacific and plan on renting a car because you want to check out a bunch of places outside of SF then this might be a good idea. Parking is prevalent (not so much in most other areas) and your $$$ goes farther in terms of getting a spot, but you will also be pretty far away from what I would consider to the be the real night life of SF.
PM with questions
Also, vrbo.com FTMFW - great call Will