A comparison of the Gospels may be interesting:
1) In Mark (1:9ff) Jesus is baptized by John like anybody else: in repentance for forgiveness of sins (v. 4). He is not an "angel", he is not the heavenly Son of God, he is not even a "sinless man". But he becomes the "Son of God" on this occasion. It is a revelation to him ("he saw...")
(Notice that this is already a secondary historicization of the earlier christology where Jesus became the Son of God only at his death / resurrection, Romans 1:3f; Acts 13:33.)
2) In Luke Jesus is "Son of God" already from birth. So Luke doesn't say he was baptized "by John"; he conveniently gets rid of John by sending him to jail before Jesus' baptism in the narration (3:19ff). Then Jesus is baptized "with all the people" and is revealed to them as the Son of God (which he already was).
3) In Matthew too Jesus is "Son of God" from birth. Jesus is baptized by John, but the baptism is explicitly performed "only for a show", as kwin said (3:13ff).
4) In John Jesus is not baptized at all. He is a rival baptizer instead (3:22,26; cf. the correction in 4:1f).
What happened in reality? Nobody can tell. What we have here is just the evolution of a story made out of the later rivalry between the "Jesus" movement and the ongoing "John" movement (which would have not occurred had John really proclaimed Jesus his successor, as the Gospels have it; for the later Mandeans who claim John as their prophet, Jesus is a false prophet). Another strange version faintly echoed in Mark is "Jesus is John raised from the dead" (6:14; 8:28), at least implying that they were not exactly contemporaries (or even "cousins" as Luke 1--2 implies and John explicitly denies in John 3:31,33).