Here is the law related to bicycles on the sidewalk, it seems it is a local option to restrict bicycles on sidewalks and in practice it usually applies to sidewalks in business districts.
V C Section 21100 Rules and Regulations Subject Matter
Rules and Regulations: Subject Matter
21100. Local authorities may adopt rules and regulations by ordinance or resolution regarding the following matters:
(h) Operation of bicycles, and, as specified in Section 21114.5, electric carts by physically disabled persons, or persons 50 years of age or older, on the public sidewalks.
V C Section 21100 Rules and Regulations Subject Matter
Rules and Regulations: Subject Matter
21100. Local authorities may adopt rules and regulations by ordinance or resolution regarding the following matters:
(h) Operation of bicycles, and, as specified in Section 21114.5, electric carts by physically disabled persons, or persons 50 years of age or older, on the public sidewalks.