San Francisco doesn't have neighborhood schools. Currently they use a "parental choice" system where parents apply to seven schools they'd like and the district assigns the child to one of those seven based on a published criteria which does include neighborhood proximity. It works currently 85 to 90+ percent of the time.
Yards are usually only found in single-family neighborhoods. Safety is the most subjective subject. I have found that many folks feel safe in different places. I might feel safe and you don't while you might feel safe and I don't.
The City has a great organization that works with folks to make any area safer by helping them join with their neighbors to look out for each other. SF SAFE.org
Truly what I find is that people feel safest in surroundings that are like where they grew up unless they are purposefully adventurous. They then expand their familiarity and feelings of security because they know more. But either way my job is to get you what you want at the best possible price. It isn't up to me to steer you or tell you where you should be.