This is the law in CA:
27001. (a) The driver of a motor vehicle when reasonably necessary
to insure safe operation shall give audible warning with his horn.
(b) The horn shall not otherwise be used, except as a theft alarm
system which operates as specified in Article 13 (commencing with
Section 28085) of this chapter.