John 3:2

The same came to Jesus by night. He probably chose the night in order to escape observation. He did not dare encounter the hostility of the priests, filled with rage over the cleansing of the temple, and yet he wished to know more of one whom he believed to be sent from God.

Rabbi, we know that thou art a teacher come from God. Nicodemus confesses, not only his belief, but that of his fellow Pharisees and rulers. The miracles of Jesus convinced them, even if they would not admit it, that he was a teacher sent from God. He came for information, and Jesus recognized it in what follows.
Copyright information for PNT