Airbnb listings: https://www.airbnb.com/s/San-Francisco--CA
Above are some apartments I found on Airbnb. They are under $150 and are in a good location. The one of Leavenworth and the one on Sutter St are both in a great location. I use to live nearby and it's very close to Union Square, which is very central. They are both surrounded by so many cafes, restaurants, and pubs.
Anytime friends or family come to visit, I always have them stay here:
It's a great hotel, walking distance to downtown and many buses, offers free breakfast (yay to save money!) and right next door is a market for food and drinks.
Here's a hostel you could try out - Green Tortoise Hostel
And I almost forgot about this one! - Adelaide Hostel
This is the hostel I stayed at the first time I came to SF by myself. The 4 bed dorm style room is under $30. The best part is the private bathrooms. I believe each floor had 2. I didn't hang out there much, just to sleep and use the internet. It's located very close to downtown which makes getting around so convienent. It's located across the street from this great crepe cafe where I ate often.