Most of the time, like 99% of the time, horses will give a warning before they bite or kick. Well, the kicking can be so quick that a person might not see the warning. But, if you pay attention to the horse's attitude, you can tell if he is thinking about biting or not. If that is the case, then do something that interrupts that thinking.
So, if you are grooming, really watch your horse's ears and eyes, and her lips (see if they get tight or stay soft and loose). If while you groom around the hip, the horse's ears flick back, or the lips tighten, you know that something negative is going through the mare's mind, somethin you are doing feels bad or worries her. you could then , perhaps , groom a bit lighter there.
when you are grooming her neck, if she pins her ears, she is telling you it feels bad or she is worried about you putting the bit in, or she simply doesn't want to work (as a school horse might). If you need to do what you need to do, and you do, right? you let her know that she has to STOP that attitude. you can hiss at her, or growl at her, or say , "AH, AH@! Missy!", or you can slap your own thigh. Don't hit her unless she really gets obviously about to try biting you.
But, you do somthing that makes her break out of that thought of being irritated. Then , go right back to grooming with rythm.
You can also groom with one hand and keep the other hand slightly raised, ready to tap her in the jaw if she starts to swing her head over. she should know that she must keep her head facing forward when she is being groomed or tacked, and a quick tap of two fingers, kind of stiff like, will get her to put her head forward.
However, don't do all this if the horse is not actually showing you that she is thinking about biting you. You are probably imagining something that she is not even wanting to do. learnging to watch and read her body language will help a lot.