Jesus was sinless and didn't need to be baptized by John as a repentance from sin. We know this because of the many places in scripture Jesus' sinlessness is confirmed.
However, Jesus did ask John to baptize him anyway, even though John was aware that Jesus wasn't a sinful candidate, in that John knew Jesus' identity and what His purpose on earth was.
John-'Behold the lamb of God who takes away the sin of the world.' John 1:29
Jesus may have gone the second mile in obedience to the Father, perhaps hearing the Father call the people to baptism through the prophet John, Jesus simply obeyed the Father as He always did, even though He had no sin to repent of.
Since elsewhere in the NT, the 'baptism of John' and the 'baptism of Christ' are treated as two different things by the disciples, it's important to see that Jesus' baptism here could have other meanings since it was not repentance from sin, meanings that may have to do with Jewish spiritual acts. Please see link below for clarification on water submersion as a Jewish spiritual rite.
http://www.jewsforjesus.org/publications/issues/v02-n10/baptism
"Though the only Biblical requirement for entrance into the covenant was circumcision, baptism became an added requisite. No one knows exactly when or by whom the requirements were changed to include baptism, but it was before the time of Jesus. We know this, because debates on the subject of proselyte baptism are recorded between rabbinic schools of Shammai and Hillel, both contemporaries of Jesus. Whereas the school of Shammai stressed circumcision as the point of transition, the Hillelites considered baptism most important because it portrayed spiritual cleansing and the beginning of a new life." from above link.
Jesus may have been comfirming Himself to the Father in holiness, and showing to all His commitment to the Father and His will, by receiving the water baptism.
He may have received baptism to show He believed in John's message, that it was from God, and showed His willingness to follow God and John in whatever way was asked.
I believe this water baptism of John was about more than for the repentance from sin, water baptism (see JewsforJesus link) was a sign of a proselyte following a prophet, and Jesus was submitting Himself to God through John Baptist's prophethood.
There is a Jewish rite called the mikveh that means submersion in water for spiritual reasons that dates back to before the time of Christ.
see wiki, http://en.wikipedia.org/wiki/Mikveh
This baptism that Christ received is not the baptism that the CC or other Christian churches practice when baptism is performed. The Christian church's baptism in water is an indication of the new birth into Christ Jesus and into His New Covenant, as well as for adults receiving this- as a repentance from sin.
John was a prophet of the Old Covenant and while he was calling the people back to obedience to God, and turning away from their sins, he was still practicing the Jewish faith and Jewish water immersion, not our Christian water baptism into the New Covenant with Christ.
The bottom line in Jesus receiving John's water baptism is that Jesus was saying "I obey God and follow Him and do all to accomplish that", Jesus was submitting Himself to all that was 'of' God.
Another point that is pertinent to the baptism of John Baptist being separate and different from the baptism into Christ, is that we find the disciples of Jesus finding those who were baptized by John, re-baptizing them in the name of Jesus, in the NT.
This is an important pt to note when understanding what the baptism of John was.