There's a great view of the city from the top of Dolores Park on Dolores and 18th--20th Streets. Lots of places to get a sandwich or stuff to make your own picnic are nearby. Dolores Park Cafe, Bi Rite Market (not so cheap unless you're careful, but really good), Good place for sandwiches on the corner of 18th and Church, though I can't remember what it's called.
I'd separate search for a view and search for food.
There are a few neightborhoods with a bias toward ethnic food
that have many, many cheep and good places ... as long as you
have reasonable expectations, e.g. sushi is likely to be expensive.
Some places to look are:
--the mission [especial for mexican, central american foods]
--the richmond [deem sum, chinese, thai etc]
--the tenderloin [a so-so neighborhood but walkable from "downtown"]
aka the tandooriloin for indian/pakistani places, thai, also contain
the "little saigon" area with many vietnamese and pho, bahn mi operations
--avoid fishing for food in fisherman's wharf. on weekends/afterhours there isnt
much street life downtown.
the mission is one of you best bets ... you can bart or muni or walk there and walk
around and go to dolores park, ritual roasters, get a burrito or tacos, have a drink,
people watch etc. i personally would pick the richmond [clement street area] or
teh 24 or valencia corridor to the haight or north beach ... places some others
a sort of a secret item few san franciscans get to try is the $5.50 rosamunde
super tuesday lunch only burger which you can eat in a bar next door with a
fine beer selection.
Mastrelli's Deli - Cozy Italian Deli with excellent sandwiches including a killer hot pressed meatball sandwich in the Ferry Building.
Goood Frikin Chickken - Juicy Rotisserie chicken meals and a full Jordanian menu. Casual sit down or to-go in the Mission.
Bi-Rite Creamery - Delicious ice cream flavors in the Mission.
Yee's - Casual and CHEAP chinese food in Chinatown. Mostly elderly Chinese, but then you know the food is good!