California law gives the rider of a bicycle the same right of way as a motor vehicle with a general negligence rules covering most injuries. However, when a bicycle lane is present, you should use care to stay within the bicycle lane and as far right as possible (or as far left as possible on a one-way street.
One of the most common types of motor vehicle vs. bicycle accidents occur when a motorist negligently opens their car door without checking to see if it is reasonably safe to do so (such as checking the mirror to determine if a bicycle is approaching.
Another major cause of car v. bicycle accidents happens when a vehicle makes an unsafe right turn into the path of a bicycle. Again, the driver of the vehicle needs to make sure that no other vehicles or bicyclists are currently occupying that lane with a right of way.
A bicyclist can also use the entire lane (not merely a bike lane or as far right as reasonably possible) as long as they are keeping up with the flow of traffic.