Horses who bite must be taught this is an unacceptable behavior! Horses learn to bite for several reasons. To prevent your your from biting, it may be helpful to examine why the horse bites.
1. Biting while being fed treats or looking for treats -- the most frequent cause of horses biting is horses having been handfed treats and learning to look at your hands for treats or food. They may not mean to bite but may confuse fingers or hands for treats and can cause serious injury. Horses must understand they are not allowed to look for treats. They should be taught they will only be given treats when they are NOT mugging for them, but are standing quietly. Some horses simply are not able to learn this, and these horses should not be handfed treats - ever. After a period of time without being handfed treats and being disciplined for looking for treats the horse will stop nosing and biting when looking for treats. If you still want to feed your horse treats by hand, you absolutely must train the horse that the "trick" to getting a treat is standing quietly facing away from you.
2. Biting in aggression -- some horses will bite aggressively when they are unhappy or for some reason don't like what the handler is doing. This is absolutely, absolutely unacceptable! A bit should be met with an instant and definitive slap from the handler. This is one occasion when it is acceptable- and even necessary- to strike your horse. Biting is dangerous- if a horse was to bite a senior herd member in the wild, they'd be kicked, bitten back, or even beaten for their action- as your horse's leader, striking back is acceptable and cannot possibly have the force another horse would have. Do not "slap" or "pat" indecisively, a bite is an unforgivable sin on the horse's part and your reaction must be enough to convince the horse it's never worth trying again. If your horse is still attempting to bite aggressively, or his aggression stems from fear, you absolutely must seek help from a professional trainer- and aggressive biting horse can be deadly.
3. Biting the due to discomfort -- For example, some horses will bite when something they don't like is done to them, such as girthing up the saddle or picking up a hoof that had an injury earlier in their life. This type of biting is easier to assess the motivation, but absolutely unacceptable. You should react to a bite with the action outlined above, but you should also be sure to be more considerate about these procedures your horse finds uncomfortable. For example, instead of throwing on the saddle and yanking up the girth, gently set the saddle on the horse and slowly cinch up the girth gently. Doing unpleasant things in a kinder way along with disciplining the horse for biting should help prevent the horse from biting.