Of course it is dependent on where you ride and local ordinances, but sidewalks should really be avoided unless absolutely nessacary. It's one of those things that is nessacary under certain circumstances, but shouldn't be done in general. If it is possible to safely ride on a road or shoulder there is no reason to be on a sidewalk. Sidewalk's are for pedestrian use. Many places in the state I live in have local ordinances outlawing cycling on sidewalks citing safety of pedestrians. It drives me nuts when people ride on sidewalks by default even where there is no compelling reason to do so.