The horn is the only means you have of warning others of the approach of the vehicle.  It should be used for the purpose of preventing drivers of other vehicles or pedestrians from getting into a position of danger.  Excessive use of the horn can be annoying to other people and is illegal.  Use it only when necessary.