Saint Petersburg has a somewhat undeserved reputation for being a dangerous city. Things have calmed down since the Wild West (or Wild East) days immediately after the collapse of the Soviet Union, but some common sense is still required.
As with most other major cities, avoid traveling alone at night, and do not get into altercations with drunks. If traveling at night, it is recommended to stay on the main sidewalks and avoid any dark alleys or yards. Gypsy cabs are not recommended under any circumstances, especially those that linger near bars where expatriates and tourists congregate.
Downtown and western parts of the city are safest. Suburbs like Kupchino, Veteranov, Ligovo and Sennaya in the center should be avoided at night time.
As a general rule, the farther you are from the city center, the more dangerous it is.
Saint Petersburg's football club, Zenit Saint Petersburg, is one of the biggest clubs in the country and has its own gang of hooligans. If you decide to visit the football stadium to watch the club play, you should buy tickets to center sectors. If you do not do this and a fight starts, you are likely to get dragged into it by either the hooligans or the police, since both will think you are part of the brawl.
Take care of money, documents, cameras, mobile phones, and anything of value because of pickpocketing. Especially watch out on the Metro during busy times, as people start pushing at the train doors, and pickpockets are frequent, particularly (but not only) at Gostinyy Dvor Metro Station. When riding the Metro, keep in mind that robbery can be a real threat; you should constantly watch what is going on around you and who is standing very close to you.
Thefts of photo equipment are really a big problem in Saint Petersburg. Photo bags probably won't save your camera -- it can be opened in less than 5 seconds. Cameras should be kept in bags slung across the body at all times, with your hands keeping a firm grip on them, and no watches or jewelry should be visible at all. Quite obviously, do not show in public that you have a lot of money. Robberies are not uncommon, and many foreigners have been threatened at gun and knife point. However, foreigners are not targeted specifically, and robbers will attack both foreigners and natives that carelessly reveal their wealth.
Take special care on Nevsky Prospekt, particularly the area with the city tour buses, a favorite spot of pickpockets and particularly of those after photo equipment. On the bright side, "Nevsky Prospekt" sees little mugging.
Russian driving is wild. Drivers attack their art with an equal mix of aggressiveness and incompetence. Guidelines are lax and rarely followed. As a pedestrian, take great care when crossing the roads, as pedestrian crossings are in 99% of cases ignored (even by police). If you are thinking of driving yourself, bear in mind that the Russian traffic police are extremely corrupt, even by Russian standards. Pedestrian crossings with a traffic light are quite safe to use, most car drivers will stop (of course, other cars will either be rear-ended or drive through crossings at ridiculous speeds with no regards for safety). Just like in any other big city always look left and right before crossing the road and make eye contact with the driver if possible.
Bar fights do occur. In the center of the city and around Nevsky Prospekt, they are unlikely to happen. However, in the suburbs and local cheaper pubs, fights occur almost daily. If you are staying with locals living in these areas, it might be a good idea to avoid these bars. Police are unlikely to show up as they consider fights as small, unimportant, regular and a waste of time, and they will probably laugh at you for calling.
Another subtle danger that can affect your trip is the inevitable effect of winter weather. Poor clearance of snow and ice is a big problem in this city. Caution is advised in snowy winters because of falling ice from roofs, and pedestrians should pay special attention to ice on the streets.
Overall, be warned that if you are used to living in the US and/or Western Europe, Saint Petersburg, as well as the rest of Eastern Europe, will seem different, and, at times, a bit intimidating. On the other hand, Russian people are usually friendly, welcoming and interested towards foreigners, and nothing should happen to you unless you put yourself in harm's way. If you don't care about them they don't care about you, and nothing should get in your way of having a great holiday.
Another danger is the bar scams that abound in the city. Please avoid at all costs Crystal bar on Griboyedov channel embankment, right next to the Savior on the Spilled Blood church. Here's how the scam works:
Girls approach you and invite to have drinks together, and then even offers to pay for those drinks. They build trust and take you to other bars. After those bars, they talk to a friend on the phone that says that whatever club you want to go is closed and so they take you to Crystal club. There you immediately start being served drinks and food without showing you the menu and then they charge you a ridiculous amount. Calling the police is pointless as they will not show up.
Stay healthy
The city's water system is not ideal because of a number of old pipes and as a result, does not provide 100% clean water. Some locals boil or also filter tap water before use; you might want to buy it bottled if water quality affects you.
In Saint Petersburg, cold water is cleaner than hot.
There are numerous public toilets. It is a good idea to take your own toilet paper, as it is not always provided. The toilets are typically extremely dirty by Western standards. If you are a Westerner, you can get away with wandering into the Western hotels, which have lovely bathrooms— the Grand Hotel Europe in particular. Just don't ever push your luck with suit-clad men guarding the hotel entrances, they are tough as nails if provoked. Many restaurants also allow tourists to use the toilet without being a customer.