Interestingly, I get yelled at regularly, to get off the street and ride on the sidewalk. Every car driver here seems to think bikes don’t belong on the street. I can bet on it happening on every ride that is not on a back road.
Where I live (Michigan), it is not illegal to ride on the road, but highly recommend to ride on the road by the League of Michigan Bicyclists (not that anyone who drives a car here knows this).
Generally, I ride on the sidewalk if going less than 15mph (and there is not too much pedestrian traffic) and on the road when going 20-25mph.
The best bet is to use Google maps, and pick out a route using residential streets (as others have mentioned). I can go as fast as I want without worrying about cars, pedestrians, or people pulling into/out of strip malls not expecting a bike to be on a sidewalk doing 15-20mph.