The New Testament mentions the baptism of Jesus Christ, but the exact reasons why the Savior submitted to baptism are not made clear in the Bible except in his statement that he was being baptized in order "to fulfil all righteousness." (Matthew 3:15.)
The Book of Mormon lists several reasons for the baptism of the Christ, including the one given by the Savior himself on the eastern continent: (1) "to fulfil all righteousness" (2 Nephi 31:5); in other words, the Savior was baptized in order to keep the commandments of the Lord. (2) "He humbleth himself before the Father." (2 Nephi 31:7.) (3) He "witnesseth unto the Father that he would be obedient unto him in keeping his commandments." (2 Nephi 31:7.) (4) "It showeth unto the children of men the straightness of the path, and the narrowness of the gate, by which they should enter, he having set the example before them." (2 Nephi 31:9.)
When we partake of the sacrament we renew the covenants we made at the time of baptism. In this regard, it is interesting to compare the major promises enumerated in the sacramental prayers with the reasons listed above as to why the Savior was baptized. The wording of the sacramental prayers also indicates that we should humble ourselves and witness unto the Father that we are willing to take upon us the name of his Son, and always remember him and keep his commandments. (Moroni 4 and 5.)
Although Nephi lived over five hundred years before the birth of the Savior, he knew by the power of revelation that the Savior was going to be baptized. Furthermore, he counseled his people to "do the things which I have told you I have seen that your Lord and your Redeemer should do; for, for this cause have they been shown unto me, that ye might know the gate by which ye should enter." (2 Nephi 31:17.) This scripture indicates clearly that baptism was practiced, at least among the Nephites, hundreds of years before the Savior was born.
Other evidence exists, in the scriptures and elsewhere, that baptism was also performed by other groups before the birth of Christ. The Jewish Encyclopedia indicates that baptism was a common practice in ancient Israel: "Baptism was practiced in ancient Judaism (Hasidic or Essene), first as a means of penitence . . . to receive the spirit of God, or to be permitted to stand in the presence of God, man must undergo baptism." (Vol. 2, p. 499.) Concerning the mode of baptism, the Encyclopedia says ". . . this [baptism] is only valid when performed by immersion in a natural fountain or stream or in a properly constructed [vessel]. This rule was, of course, also preserved in the temple at Jerusalem." (Vol. 1, pp. 68-69.)
The fact that baptism was practiced in ancient Israel might help explain why the Savior was not criticized by the orthodox Jewish people when he was baptized. The Pharisees were quick to criticize the Savior whenever he did anything contrary to their law. However, not a single word of criticism concerning the baptism of Jesus Christ is found in the entire New Testament!
(If you desire additional information on the topic of baptism among the Nephites, see the discussion following 2 Nephi 9:23-24.)