Safety: Road position
Many cyclists assume or were taught that correct road position for a bicycle is as far to the right as possible. In reality, this is often not the safest place to ride; indeed, staying to the far right can be the cause of crashes. Most laws direct cyclists to ride as near to the right as is safe. In other words, cyclists are not required to ride as far to the right, if they do not feel safe doing so. So where should you ride?
Just as with any vehicle, there is no one place where you should always ride. Skilled cyclists choose from various options depending on the situation. These choices are based on a few principles:
Your right to the road
In the United States (as in many other countries), cyclists have an established legal right to use the roads. In most states, this right is codified in statute: bicycles are to be treated as vehicles, and cyclists have both the rights and duties of motorists (except where a distinction is drawn between motorized and non-motorized vehicles). In states lacking statutory code, common-law principles (ie., well-settled case law) apply, to the same effect.
You have the right to use the road, and you also have the obligation to follow the same rules of the road as motor vehicles.1
Where to ride
Ride in traffic
If you look at the common crash types due to motorist error (Drive Out, Overtaking, Left Turn, Right Hook), you'll see that two factors are at the root of most of these crashes:
By taking the lane, rather than riding alongside it, you minimize the chance of motorists making these errors.
Visibility: By riding as part of traffic, you're riding where motorists are looking. They will notice you, particularly if you wear bright clothing and (at night) equip yourself with bright lights. When you ride far to the right, not only are you riding where motorists don't look for other vehicles, but you are much more likely to be obscured to cross-traffic by parked vehicles or objects on the sidewalk/roadside.
Passing and turning space: By taking the lane, you automatically prevent Right Hooks from behind you, and you prevent motorists behind you from misjudging lane width and trying to squeeze past you. You also avoid getting doored. Better to have a driver honk at you from behind than crash into you in haste.
Take the lane but don't hog it: When you are travelling more slowly than traffic, you should find places where you can safely yield the lane and let traffic pass. On a long uphill, for instance, staying to the right often makes the most sense. At slow speeds, the dangers of a Right Hook are much less. But if there is no safe place to let traffic pass, then either take the lane or find a different route.
Ride on the sidesometimes.
On high-speed roads, taking the lane is not generally safe. Ride to the right, preferably in a bike lane or smooth shoulder. (On one-way roads, it may also be appropriate to ride on the left.) On such roads, it's extremely important that vehicles have adequate passing room and that your visibility to motorists is excellent. Exercise caution on curves, where motorists' line-of-sight may be limited. Crashes due to poor visibility on high-speed roads, while uncommon, are among the most dangerous.
You are safest when you're riding in a straight line with traffic. Weaving in and out of traffic, or in and out of a parking lane, or onto the sidewalk, are all occasions for crashes to happen. Better to take a position in the lane and keep it, even if room opens up on the right (say, in a parking lane).
Ride in a designated bike facility
Bicycle facilities such as bike lanes and shared lane markings (sharrows) are intended as safe places for bicyclists to ride, and usually they are. In some cases, however, due to design issues or unexpected road conditions, they are not. As with any situation, use your best judgment about the safest place to ride and don't assume that you must stay in the painted lines just because they are there.