The Jewish nation was a consecrated nation, a covenant people. They were all baptized into Moses when they left Egypt. 1 Corinthians 10:2 (NKJV), “all were baptized into Moses in the cloud and in the sea”. God accepted them in Moses, the mediator of their covenant at Mt. Sinai.
However, at the time Jesus was speaking, the nation had forgotten their covenant. Many were openly living as publicans and sinners, and others were self-righteous hypocrites.
John's ministry, therefore, was repentance and baptism for the remission of sins--a return to God and to a recognition of the repentance and reformation of heart and life. Nicodemus was a Jew. No Jew could become a follower of the Lord Jesus and enter into the kingdom, until first of all he had experienced this reformation and had been baptized, “born of water.”
Water may have a fuller significance. We see that symbolic water represents truth, and that our begetting of the holy Spirit is said to be also a begetting “through the Word of truth.” (James 1:18) The Apostle Peter also wrote, “having been begotten again, not of corruptible seed, but of incorruptible, through the word of God, which liveth and abideth.” 1 Peter 1:23 (ASV)
Therefore, our regeneration or begetting again by the holy Spirit comes to us with washing or cleansing. This is effected to us by the operation of the Truth--the divine message.
In addition to this there must be the begetting of the spirit, and then in the resurrection, the birth to the spirit nature--"born of the spirit." Only those who experience this complete reformation of heart and mind, and who are "changed" in the resurrection, will ever enter into the heavenly kingdom of God.