This passage starts out with Nicodemus coming to Jesus under the cover of darkness for fear of being found out by his friends. Jesus, at the end of this passage, calls him to come out of the darkness, away from slavery to the legalistic law of the Pharisees, and venture out into the light where there is true freedom in the Spirit who gives life, and joy, and peace, and hope. That is the end of this encounter that Jesus had with Nicodemus the Pharisee.
Make no mistake, people, there are plenty of modern day Pharisees today who look around at everyone else, judging them and yet believing that because they think they have the Bible all figured out, they are okay. That is the worst kind of darkness. These kinds of people are the hardest to save. They sit in the pews of every church and have been there for decades, but they do not see Jesus. He is calling all of us to come out of the darkness and into the light so he can give his Spirit who will give life, joy, peace and hope to dark, cold, hearts.