"Cast" means to throw, and when you "cast something back in someone's teeth", you are throwing words at them, often reminding them of something they themselves once said: reminding them of a time they were wrong, generally. This would happen in a bitter fight.
Example: The wife turned on her husband and cried out, "You were the one who said we should buy this house. You said it was a good investment!". The husband growled, "And you agreed. You have no right to cast that in my teeth!"