I am a regular rider of bicycles both in the US and Japan, and it has become clear to me that a lot of folks out there really don't understand the law with respect to cycling. So as a friendly reminder, I'd like to make a short summary of car/bike/pedestrian interactions and rules. Obviously, rules vary from place to place, but in general, here are some handy reminders.
1: Bicycles, as per the law, are treated as vehicles. They not only have the right to be on the road, but in many locations, are required to be on the road. Cyclists have full rights to take and hold a lane of traffic if they feel the need to do so, or any time they are turning left.
2: Riding on the sidewalk may or may not be legal where you live. It is typically left up to local governments, and may be outright illegal, or only legal for children or small bikes, or entirely legal, or legal everywhere except downtown, or any of a thousand other variations on the law. A cyclist is never required to be on the sidewalk. They are, however, generally required to be in a dedicated bike lane, except when turning left.
3: Cycling on the sidewalk is generally considered to be 2-3 times as dangerous (accidents per mile) as riding on the road. While obviously this varies by context and on some particularly bad stretches of road or for certain types of bikes, riding on the sidewalk may be the better option, in general it is not. This is mostly because of drivers popping out of driveways without looking, or even worse, blind driveways where walls or plants block the view. This is why riding on the wrong-way sidewalk is particular dangerous - drivers simply have no reason to look in that direction, and often don't.
4: Slow-moving vehicle regulations usually apply to cyclists. This generally means they must move over to the right side of the lane and faster vehicles pass them IF it is safe to do so. It also generally means that the faster vehicles are allowed to cross double-yellows if it is safe. However, drivers should realize that it is often not safe for cyclists to slide over to the right. The shoulder may be littered with debris or parked cars, the lane may be too narrow for cars to pass cyclists safely and legally, or there may be blind driveways which are extremely dangerous for cyclists. Also, just about any major intersection is dangerous for a cyclist to navigate from the right shoulder. In all of these cases, cyclists have the right to take the lane and avoid the danger.
5: Depending on your jurisdiction, you owe cyclists 3-5 feet of space. Passing them any closer is illegal. If you can't give cyclists that much space, you have to wait.
6: Remember, virtually all adult cyclists are drivers as well. Cyclists generally have a very keen awareness of what the cars around them are up to, and are not trying to be in anyone's way*. Also please realize that automobiles and their infrastructure get in the way of cyclists at least as much as cyclists bother drivers, and that automobiles place a much greater amount of danger on cyclists as the reverse.
7: As for pedestrians, please remember that there is a good chance cycling on the sidewalk is legal where you live. Stay to the right in general, and be aware before you make any quick turns. Most cyclists will slow down, ring a bell or say "On your left" or otherwise give you warning. All you have to do is not lurch about randomly, and no one is going to hit you.
8: Cars kill about 2000 times as many pedestrians as cyclists. You should be worrying much more about the tons of steel hurling past you at 50 mph than the 30 lbs passing you at 10 mph. Note that the most common type of serious pedestrian/cyclist crashes is at red lights, and in many cases, an aggravating factor or even primary cause is pedestrians who start walking into the intersection before the crosswalk light turns green. These folks see the light turn red, can see and hear that no more cars are coming, and try to get a 1-2 second head start on crossing the street. Unfortunately, they didn't see or hear the cyclist who still hasn't cleared the intersection and may very well have entered it legally while the light was still yellow.
There is a lot we can do from an infrastructure standpoint to improve the relationship between automobiles, bicycles, and pedestrians, but there will always be some level of conflict. Everyone needs to take a breath, learn to share, and realize that your preferred mode of transportation gums up the other guy's day just as much as his does yours. Also, please don't get all hypocritically enraged about the other guy breaking this-or-that law, because all three modes have their particular laws which are routinely ignored by most of their practitioners. For example, cyclists often pass through red lights or stop signs, pedestrians jaywalk, and autos routinely speed, tailgate, park illegally, and run through reds well after they flip. There aren't any saints out there, you included.
* Unless you are a real butthead and verbally or physically try to intimidate cyclists. In that case they very well might get in your way on purpose, and you more than deserve it. In fact, you deserve a reckless driving ticket if you are intimidating a cyclist with your vehicle, which unfortunately is not an uncommon occurrence.