If you are visiting Daly City, by all means, stay in Daly City.
If you are visiting San Francisco, and you stay anywhere in the suburbs, the time, cost, and hassle of taking transit in to see everything will make you wish you'd stayed right downtown.
This is no joke.
BART is not that close, nor are the bus lines that go into downtown. You'll have to figure out schedules and connections, because you may be using more than one mode of transportation. If you want a little rest during the day, or your feet hurt and you need to change shoes, or you have purchases to drop off, or you want to go to dinner but feel you'd like to dress up a bit, having a hotel in S.F. is a real advantage. If you get back to your suburban room in the afternoon, you may be so tired that you just have dinner at the IHOP around the corner (or McDonald's or Carl's Jr, for variety), instead of returning to the City for nighttime entertainment or other options.
If you want some fresh air in the evening, a hotel or even a motor lodge in S.F. will put you on a street with atmosphere, people to watch, a business or two where you can get a bite or a souvenir. At the Hampton or anywhere in most of the suburbs, you'll have to be content with star-gazing from the parking lot and having nothing much to see or do.
I would STRONGLY suggest that if you're on a budget, think about a motor lodge in the City. You don't need a car to stay there. There are many along Lombard Street, or near Fisherman's Wharf (the Columbus Motor Lodge gets good reviews here; it's a block from the Wharf and the cable car runs right by).
The biggest minus of staying in the 'burbs is that you're not IN San Francisco. The City has a unique ambience and energy that you won't find elsewhere, and part of the enjoyment is when you stay over and experience it 24 hours.