1. Aug 1 – Sept 20 is the very best window IMO, for the reasons given above. I schedule multiple trips during that time, and if it's a ridiculously crowded area (like Mammoth/Ritter Range) I save it for after Labor Day. I don't care for hauling through snow so I simply don't go in June (unless it's a low-snow year).
2. The higher you go, the more spectacular it is. 10,000 feet is where it starts to get interesting. In the Sierras, alpine (above treeline) is way more interesting than the forest. Pick high trailheads. (If you want interesting *forest* hiking, go north to Trinity Alps or Mount Hood or Washington State; or try any coastal Redwoods hikes in the Bay Area.)
3. South or East are generally more dramatic than North or West. My faves are the (eastside) trailheads accessed from the highway 395, such as from Mammoth, Bishop, and Independence. Get out a CA map to see where that is. Normally from the Bay Area you would cross Yosemite on Highway 120/Tioga Pass (open only summer/early fall) to get over there. It's a longer drive but it's worth it.
4. The most spectacular *backpacking* scenery/experiences are not necessarily in the national parks. I've been everywhere in Yosemite but no longer go there b/c frankly the backpacking isn't very interesting. It is simply more beautiful south of there, in the so-called High Sierra that extends from southern Yosemite to Sequoia NP. Don't make the mistake of most newbie packers in San Francisco who end up slogging up hot ridges in Yosemite for years just because they didn't know about all the places south of there that are so much better, e.g. Ritter Range, Silver Divide, Pioneer Basin, Evolution Valley, Kearsarge/Rae Lakes, Mineral King, to name just a few fav areas.
5. Any trip in the book, Trekking California, is your friend. That author does a great job picking the most spectacular hikes IMO. Be aware that some of those trips are long and ambitious though.
6. After a couple of short hiking trips to try out equipment, you should (time permitting) hike the entire John Muir Trail, which is the best possible introduction to the High Sierra. Once you've done that trail, you'll know which areas you'll want to come back to, to explore.
7. Weather is mild in the Sierras. I've been snowed on extremely rarely, almost always it's been after Sept 20. Compared to 99% of places in the world, the Sierras weather is stable, warm and dry. Thunderstorms do happen but they're often predictable, they come in 5-day patterns where clouds build in the afternoon and (by the 3rd or 4th day) start to dump rain mid-afternoon, and only for 1-3 hours. Extremely rare to have, say, several days of hard rain to slog through. That said, I always bring my shelter and some light rain gear just in case.
– Elizabeth