I have lived all over the Philly area. If you are looking inside Philly, but outside Center City, some neighborhoods to consider are Bella Vista (around 6th and Catherine area just south of South Street), Fishtown and Northern Liberties. A little further out are some parts of Northeast Philly like Mayfair or Torresdale, and great neightborhoods East Falls (my favorite), Roxborough, Manayunk, and Chestnut Hill.
These are all pretty safe areas, with nice homes and a good sense of community. There are others, but these are my favorite for the people I have met, places I frequent, and ease of getting around.
Ouside the city, your chances of getting into center city in 10-20 minutes are not good, but there are a vast number of towns (like Narberth, Newtown, etc) that are great places within 30-45 minutes of town. Check out Realtor.com and other sites like it to see the housing stock in each area (I like Bucks and Montgomery counties) and take a Satursay or Sunday drive through those areas to get a feel for them.