I would say Sydney is a relatively safe city. I lived there for a period in my early twenties and now travel there regularly for work and never had any troubles. I felt safe walking around the city and tourist areas alone at any time of day or night.
Like any major metropolis, you have to use common sense and look to avoid situations that pose danger (i.e. don't binge drink in Kings Cross on a weekend). I think the biggest danger for tourists in Sydney (especially from America) is looking the wrong way when you cross the street!
It depends on the area. Sydney is a safe city. I feel safer in Sydney than in Melbourne. The only exceptions would be the following areas: Bankstown, Blacktown, Punchbowl, Lakemba, Mount Druitt and other outer western Sydney suburbs.