I'm from Sofia, it is a great place, some of my favorite places are the Natural History Museum and the National Gallery. Some cool lesser known places are the Museum of Socialist Art, the ruins below Sveta Sofia and the old bath building, I believe it is a Museum of Sofia now, not really sure though. There is a Museum of Paleontology located inside of Sofia University which I think very few people know of, however, it is great, it has the fully preserved skeleton of some mammoth-like creature.
If you want to try good Bulgarian food go to the restaurant in the middle of Ariana lake, Manastirska Magernica or Raketa. For a more contemporary and modern approach to traditional dishes try Cosmos. I believe the best traditional food is served in a small place called Kontesa which is right next to the St Nicholas church, however, I'd advise you against going there, the owners are an old couple that I don't think speak any English, furthermore, it is not the most touristy area, seeing that there are a lot of gypsies and heroin addicts who are given medicine very close to this park. If you want fast food you can do Boom Burger or Wok to Walk. An Irish pub with a lot of foreigners called JJ Murphys is located right in the city centre, for bars and nightclubs you can have everything, traditional pop, rap, techno, bulgarian chalga, just tell me what music and places you like so I can recommend.
The city is pretty safe, but don't be stupid, stay out of the Zhenski Pazar area that is close to the center, other than that you will really have to wander off your way in order to get to a bad neighbourhood. It's better to avoid Borisova Gradina at night, the park is well lit, but there are no cameras and/or police, as of now I think it's really safe, but the place seems to have a bad reputation so it's better to just not go there during the night, it's perfectly fine throughout the day.