Then he gives the reason: for by your words you will be justified... In the courts of this world the innocent are sometimes punished and the wicked set free, because judgments are based on the statements of witnesses; but in God's court judgment is based on the person accusing himself, namely, on self-confession. Hence lest you suppose that you will be judged on the basis of what others say about you rather than what you say about yourself, he says, by your words you will be justified and by your words you will be condemned: "I will condemn you out of your own mouth, you wicked servant" (Lk 19...:22).
Source: Commentary on Matthew