Rule: The headlight should be on low beam if there is on-coming traffic.
Traffic Logic: Headlights on high beam blind drivers in on-coming traffic (towards you, on the opposite side of the road). They would not be able to see pedestrians or obstructions on the road in the glare. This is a safety hazard. Put the beam on low, at least until the other vehicles are completely past. Avoid using high beam except on highways without streetlights. Traffic police fine drivers using high beam within city limits.
Driving hints: Clicking the headlight off and on is a request to the on-coming driver to put the headlight on low beam. Lower the beam if requested like this.
Do not flash the high beam to request the other person to put their light on low beam. That is a request to give way to the vehicle doing the flashing and will be misunderstood.
More: In modern vehicles, there is a switch on the front to put the headlight lower. This has four settings. You should put the beam lower when there are people seated in the back of the vehicle, or there is heavy load in the back. This is because the weight tends to tilt the headlight beam upwards. Even on low beam setting, it might blind the oncoming traffic. You can switch it back up if there are no people or weight at the back of the vehicle.
Still more: In some states, drivers were required to paint the top of the headlight black to avoid accidentally using the high beam. This was silly because it prevented people from using the high beam when it was really needed. However, people being even more silly and not dipping the beam when it hits oncoming traffic is the reason. So don't be the idiot who makes everyone suffer.
Back