Is it head bobbing or head tossing? Two different terms, at least in my horsey background.
In my experience, head bobbing is generally a sign of lameness or soreness in the legs or back, similar to how you may cringe or walk oddly if you twist your ankle. His head will go up and down when he moves because he's compensating for pain somewhere. It's unlikely he'll bob his head while he's just standing still, unless you palpate and find the sore spot.
Head tossing would be more like swinging his head up & down or side-to-side, whether he's moving or even standing still - it could still be pain related, and could be due to his teeth, as you asked. But some horses head toss just to avoid work, like being haltered or bridled, or because they are losing their vision and he's getting spooked since he doesn't see things coming toward him. Then I once received a "problem horse" for training, but his head tossing was solved the moment I removed a chunk of tree bark that was stuck in his ear.