My roommate got 0wned riding her bike on a sidewalk, guy pulled out of a driveway in front of her, she rides a pedal-assist bike so she was going fast. Her back was messed up for awhile. I only ever use the sidewalk if the road is completely hostile to me and my bike, like road construction, that sort of thing. If I have to take the sidewalk, I keep my speed down and listen and watch for any driveway idiots that aren't paying attention.
As a pedestrian, I've nearly been run over countless times by morons that are only looking at the oncoming traffic and not for pedestrians etc right in front of their car. Always make eye contact with the driver.