His tooth was giving him pain so he broke the fast
Question

I went to a dentist when I was fasting to have my tooth treated, and the dentist said that he had to pull the tooth out, and that caused me pain, so I broke my fast. What should I do now? Please advise me, may Allah reward you.
Praise be to Allah.It is permissible for a fasting person to have fillings or have teeth extracted, even if the site has to be anaesthetized, and that does not affect his fast so long as he is careful to avoid swallowing anything such as medicine or blood. See the answer to question no. 13767. 
It is not permissible for him to break his fast unless the pain is too much for him and he needs to take medicine for that, or he is bleeding too much and has become weak as a result. 
Based on this, if you broke your fast just because of having a tooth pulled, then you made a mistake, and you have to repent to Allah and make up that day. 
And Allah knows best.