But as many as received [Jesus], to them he gave power to become the sons of God, even to them that believe on his name:
John states that we can become sons and daughters of God (heirs) only through our receiving Jesus Christ. This obviously isn't the generic "I am a Child of God" that denotes all of us having come from his presence, but rather the child or heir that Jesus spoke about during his ministry. And the next verse states that this heirship does not come from any human impulse or act of human will; it comes entirely from God. We cannot make ourselves heirs with Christ. What we have is an invitation from God to become his sons and daughters by entering into the relationship with Jesus Christ (receiving him) that he offers us and becoming empowered by that to, through his grace, become his heirs.
What God offers we are free to accept, delay or refuse. A father may offer his child his love, his advice, his friendship, and the child may refuse it or prefer to ignore and take another path through life. So it is with what God offers us. He offers us the right to become his heirs, to truly be his children in all things, but we are not compelled to accept that.
Why "to them that believe on his name"?
Herbrew thought and language had a way of using "the name" that's interesting. It did not mean a person's appellation, but rather his nature. For instance, Psalm 9:10: "Those who know thy name put their trust in thee." does not mean that those who know God's is called "Jehovah" will trust God, but rather that those who know God's character, or nature, or what he is like, will be ready and willing to trust him for what they need.
To "trust in the name of Jesus" therefore means to put our trust in his true nature. He was the embodiment of kindness and gentleness and service towards us. It is John's central doctrine throughout his gospel that in Jesus we see the very mind of God, the attitude of God to men. If we believe that doctrine, then we also believe that God is like Jesus, as kind, as loving as Jesus was. Therefore, according to John's thinking, to believe in the name of Jesus is to believe that God is like him, kind and loving to those who struggle, who are lost, who seek him, etc. etc..
And it is only when we believe that about God, that we can trust him enough and become close enough to him to respond openheartedly to what he offers us in terms of a relationship and submit ourselves to him and become his children. And that, combined with the divine cleansing power of Jesus atonement for our sins empowers us to become truly God's sons and daughters, joint heirs with Christ.
How essential that understanding of the nature of God is! How difficult it is to build a relationship with a God who you see as stern, judgmental, cold or distant, demanding, impatient or disappointed in us or in others with whom we struggle. How much easier it is to build one with a God who we know acts, thinks and responds as Jesus does and therefore learn how to be that way ourselves as we approach God.
This is what Jesus opens to us: the possibility of moving from being intimidated or indifferent acquaintances of our God that we perceive erroneously and, instead, opening ourselves to a trusting close relationship that is one of an attentive, responsive son or daughter and heir in every sense of the word.