Shaving your legs sounds like a polite thing to do before getting a pedicure, but it's a bad idea. Every time you shave, the razor creates tiny nicks in your skin. You may not feel them or see them, but they're there. A nick doesn't even have to draw blood to be vulnerable to infection. Those abrasions are like open doors inviting bacteria into your body.
Most nail salons are pretty clean, but dealing with so many people in a confined space does create the potential to spread disease. Bacterial, viral and fungal infections have all been linked to nail salons. If you do contract an infection, you might just catch an inconvenient case of athlete's foot. However, you could come away with the virus that causes warts (ugh), or even contract Mycobacterium fortuitum, a bacterial infection that can cause nasty sores and leave significant scarring. Knowing the salon you choose uses safe practices is important, but so is staying as insulated from potential problems as possible. Refrain from shaving your legs for a few days before visiting the salon.