In most jurisdictions, it is considered a traffic offense to scare horses or livestock with your car. Agitated animals can become unpredictable, leading to accidents and injuries. In some cases, it may even be considered animal cruelty.
Laws and penalties vary by jurisdiction, but you can generally expect a fine if caught. In some cases, you may be arrested.
If you see a horse or other livestock on the side of the road, slow down and proceed with caution. Avoid sudden movements or loud noises. If the animal is spooked, pull over and allow it to pass.