Most of the time Jesus was surrounded by ordinary people but now we see Him in contact with one of the aristocrats of Jerusalem. Nicodemus was undoubtedly rich, because when Jesus died, he brought His body and anointed it with expensive myrrh and aloe. He was also a Pharisee. In a certain sense they were the best people in the whole country.
Nicodemus was a ruler among the Jews, which means that he was a member of the Sanhedrin. The Sanhedrin was a court of seventy members and to the Jews it was the highest court. Naturally their power under Roman dominance was very limited, but it was still extensive. They had spiritual jurisdiction over every Jew in the entire world and one of their main tasks was to investigate and evaluate anyone who was suspected of being a false prophet. Thus it is amazing that Nicodemus wanted to speak to Jesus.
Nicodemus belonged to one of the most esteemed families in Jerusalem. Why would a Jewish aristocrat come to this homeless Prophet who was once a carpenter in Nazareth? It was a miracle that Nicodemus got the better of his prejudices and came to Jesus for advice and that at night Nicodemus was a confused man who enjoyed all the esteem, but who lacked something important in his life. Most likely he hoped to find the Light in the darkness of night.