Next, we see the dissension among the rulers. First, the advice of Nicodemus is given; secondly, the opposition of the rulers; and thirdly, the outcome of the whole affair. The Evangelist does two things about the first: first, he tells us something about Nicodemus; secondly, he gives his advice.
He tells us three things about Nicodemus: the first two show us the attitude of Nicodemus himself; and the second reveals the malice of the rulers. The first concerns the faith of Nicodemus, and he says: Nicodemus, who came to him, i.e., who believed, for to come to Christ is the same as to believe i...n him. The second shows the imperfection of his faith, because he came at night. For if he had believed perfectly, he would not have been fearful, for as we read below (12:42): "Many of the rulers believed in him, but they did not admit it because of the Pharisees, so that they would not be expelled from the synagogue." And one of these was Nicodemus.
The third thing the Evangelist tells us shows us that the rulers did not speak the truth: for they said that none of the rulers, or of the Pharisees, believed in Christ. And so the Evangelist says about Nicodemus that he was one of them: as if to say: If Nicodemus, who was one of the rulers, believed in Christ, then the rulers and Pharisees are speaking falsely when they say that none of the rulers believed in him. "Truly, a lie was spoken" (Jer 16:19).
Source: Commentary on John