Nicodemus was a Pharisee and a "teacher of Israel" (Jn 3:10), a prominent Jewish leader. He was intrigued by Jesus. In his prayers he realized God was with Jesus, for he knew no one could do such wonders without God's approval (Jn 3:2).
Nicodemus approached Jesus at night (Jn 3:2). This tells us several things about Nicodemus. First, he was open to Jesus and wanted to learn from Him. If Nicodemus was hostile to Jesus, he would have simply confronted Jesus during the day as did other Pharisees. Second, Nicodemus had the humility to realize that God was moving in a new way through Jesus. Nicodemus wanted to move where God was moving, and thus he was impelled to approach Jesus. Third, Nicodemus was fearful of the opinion of others. He did not want to be associated with Jesus publicly.
Nicodemus next appears amid an assembly of Pharisees and chief priests who had attempted to arrest Jesus. He takes the next step in discipleship by publicly associating himself with Jesus. He speaks up to defend Jesus and encourages them to listen to Jesus and learn the facts about Him (Jn 7:50-51). In so doing, Nicodemus is ridiculed and taunted (Jn 7:52).
Finally, Nicodemus appears in broad daylight to bury the crucified Jesus, "bringing a mixture of myrrh and aloes which weighed about a hundred pounds" (Jn 19:39). Though the other disciples fled for fear of death, Nicodemus is not fleeing. He shows his total commitment to Jesus by carrying a hundred pounds of spices, a quantity fit for the burial of a king. Nicodemus, now a bold disciple, has accepted Jesus as his King, Lord, and God.