Where I'm at, it's legal to ride on sidewalk if there is no bikelane and not in the core downtown business district. HOWEVER, you must slow down to walking speed when near pedestrians and driveway cutouts.

It's much more dangerous for the rider to be on the sidewalk then the street--cars aren't expecting them there and they are more likely to get hit by people backing out of driveways, and even if they swerve to avoid them, they may do so and end up in the road in front of another car.