Honestly cycling is not as common in St Petersburg as it is in many places in Europe and in the USA. The reason is that there are no cycling paths in the city and drivers in Russia drive fast and can violate the rules easily. As a result cycling can be rather dangerous. You won’t be able to use sidewalks as they are full of people in the city center and when you make a detour round the pedestrians you can easily hit someone. Finally, it is very problematic to carry a bike by public transport as the guards may not even let you in with it (especially in trams and buses). As for metro, you can carry only folded and covered bicycles. Nevertheless, you can see locals riding bikes in St Petersburg, but they are not so numerous here as in other European cities. All in all, I would recommend you to rent a bicycle in St Petersburg only if you are an experienced cyclist and don’t plan to leave the city center and use any other means of transport. It’s just my personal opinion. There is a number of companies that offer byke tours of St Petersburg and they may be an ideal solution if you can’t bear an idea of not using bike at all.