California law requires drivers to pass bicycles on the roadway only when they can safely allow 3 feet between the vehicle and bicycle. This is an infraction section, punishable by fine, and the driver may be subject to an increased fine should they cause a collision causing injury to the bicyclist.
If there is insufficient room to pass a bicyclist with the required 3 feet clearance, the drive must slow and not pass until safe to do so, and with the 3 foot clearance.
Bicyclists, too, play a role in roadway safety. California law also requires bicycles to be ridden with traffic, safely close to the right side of the road when no bicycle lane is designated, and they are subject to all rules of the road. Riding in a "pack" or abreast on the roadway is not permitted and is also subject to citation.
The California DMV is a great resource for information for drivers and bicyclists. Pay their website a visit!