A horse that nips is an annoying horse, and one that sooner or later will hurt someone by biting him or her. So you need to correct this habit as soon as possible. It isn't necessary in most cases never to feed the horse by hand, though if the nipping habit is bad, it will help not to feed him by hand temporarily until you get control of the behavior. Your hand (or your arm or back) doesn't look or smell like a lump of sugar or a piece of carrot, and he can be taught to know the difference. In a sense, nipping is a dominance trait: If your horse nips you often, he is dominant to you, and you should take steps to stop this behavior before he bites rather than nips. Know that male horses, particularly stallions, are more prone to nip than mares, though dominant mares don't hesitate to use their teeth to reinforce their leadership position in the herd.
First: re-examine how you handle your horse. When you are working around him in his stall, tie him up so that he CAN'T nip you. You should tie him with a length of rope about the same length as the length of his head, so he can move but not swing his head around. Don't go under his neck to get to his other side. This invites a nip. If you simply must go under his neck, hold his halter and lift his head as you go underneath it. Watch your horse, and if he makes a move to nip, or you feel his teeth on you, punch him (not very hard but enough to get his attention) on the side of his mouth with the flat of your knuckles to startle him. This will make him jerk his head up and away. Another horse might become headshy from this, but a nipper will simply learn to jerk his head up and away from you when he is about to try to nip, because he will learn to avoid being lightly punched.
If you can arrange it, use cross ties when you groom your horse or saddle him. And be careful-putting your hand on his halter-if you simply must go under his head and neck. It goes without saying, if you own a nipper, don't let people stand in front of him or play with his lips or mouth as you are grooming. Tell them your horse may bite, and to please stay 3 feet away from him. Enforce this rule. If they just HAVE to pet him, ask them to stand by his shoulder and pet his neck.
When leading your horse, be careful to hold the leadline in both hands. The hand nearest his mouth should be six or eight inches from the halter-enough to punch him lightly on the side of his mouth if he moves to nip. The effect you want is that he moves his head up and away from you in response to your punch. And be sure never to let him walk behind you, where he can easily nip your back. Keep him up with your shoulder, and make him walk beside you. Above all, pay attention to him so that you can control him.
When you mount the nipper, shorten the outside rein somewhat-enough so that he can't get to you but not so much that you pull him off balance-so he can't reach you with his teeth as you put your foot in the stirrup and get on.
As you can see, your approach has to be one of careful horse management so that he simply cannot nip you. If he does succeed in reaching you, you should give him enough of a consequence that he notices it and doesn't like it, but you have to maintain control of him and not let him get away, as he might learn the unfortunate habit of nipping and immediately leaping out of reach. Better to keep him close and control his head. Also be aware that you might teach him that YOU are not there for him to bite, but he will probably not transfer that knowledge to other people. If they handle him, and are careless, he will probably nip them, just as he used to nip you. So you will have to learn to handle bystanders as well as your horse!