Certain roads in my area simply are not safe. Then I opt for the sidewalk.
That being said, I mostly ride in the road. You do not loose speed going up and down sidewalks, less sore, less bike wear, and more.
Bike lanes are wonderfull also.
I periodically replace parts of my route with street riding as I find more options and get more comfortable. Recently I replaced a beat up bike path with a nice side street.