In a public place Jesus declared himself “the light of the world.” Then Jewish teachers scoffed, saying he proved nothing with the claim. Then it was Jesus’ turn. He evoked the Jewish law that called for two eye-witnesses to determine a fact. He said he was one witness and the other one was God
John “It is written in your law, that the testimony of two men is true. 18 I am one who bears witness of myself, and the Father that sent me bears witness of me.”
The rule comes from the Old Testament book of Deuteronomy, which says that the court demands two (or more) eye‑witnesses if a person is accused of a crime. Well, what crime? At the time, Jesus wasn't accused of one.
And what's more, the eye-witnesses should step forward to testify. But God, the other witness, didn’t appear and speak in behalf of Jesus.
Deuteronomy calls for two witnesses, to convict a person
Deuteronomy One witness is not enough to convict someone of a crime; at least two witnesses are necessary to prove that someone is guilty.
And calls for the same in a case of accusing somebody of a sin against God
Deuteronomy 17:2 Suppose you hear that in one of your towns some men or women have sinned against the LORD and broken his covenant. ... 6 However, they may be put to death only if two or more witnesses testify against them; they are not to be put to death if there is only one witness. 7 The witnesses are to throw the first stones, and then the rest of the people are to stone them; in this way you will get rid of this evil.
Recap: Jesus wasn’t accused of a crime or sin at the time. So two witnesses weren't needed. Apart from that, to claim God above and himself as the testimony of two? Uh ... right.