(disclaimer, I'm a man)
Like in most city, use common sense; know your way around, be conscious of your surroundings.
I found Rome to be safe day and night (evening) in most tourist areas.
When alone, especially at night, do not "look like" a tourist; keep all valuables in you handbag, and your handbag in front of you.
Better yet, keep all your valuables at home or at your hotel; bring only what is necessary with you ( for example, some cash, 1 credit/debit card, insurances card, photocopies of your passport); use a body pouch, and access it when alone (in a bathroom).
You risk being pickpocked a lot more than being harrassed, or be violented (in all fashion).
Keep clear of pan-handlers (all ages ans sexes), trick-card people, people selling you tickets off the streets; say "NO" and say it loud and move away; if someone ask for your help, again, be careful, and say "NO"; and move away (first person ask for help, and second person steal your stuff.
If wanting to buy tickets or tours, do it from licenses tour operators, either locally or from the Internet.
Traffic can be dangerous, cross with other people, and do not be timid, if you cross the street, go for it, cars will stop; if you try bactracking, then cars do not know what is your intention and the risk will be increased.
Public transport: I rarely used buses or metro in Rome, I can't be specific, but in all public transport, there is an unfortunate risk of groping and pickpocketing. The level of "threat" can also depend on your experienced with public transport (and what is acceptable to you).