In 1st-cent. CE Palestine in the time of Jesus the word was a form of address, equivalent to ‘sir’ but by the end of the century and in rabbinic literature it is used for a teacher, and this development is reflected in the usage in the four gospels.
The word occurs in Mark (9: 5; 11: 21; 14: 45) as a polite, even reverential, form of address when spoken by Peter. In Mark 10: 51 the form Rabbouni (NRSV marg.) is used by the blind man who then follows Jesus ‘on the way’. There is a suggestion of the greatness of Jesus.
In Matthew only Judas addresses Jesus with this greeting and the sense is plainly hostile (26: 25, 49). For in this gospel rabbis are among the adversaries of Jesus and they are painted in unfriendly colours: they like to receive deferential treatment and to be called ‘sir’ and they are assuming the role of teachers (23: 8) of the Law. Matthew keeps Jesus at a distance from them; he is not to be associated with them and the hateful Pharisees, and his disciples are forbidden to arrogate to themselves the title (23: 8).
The word is not found in Luke, but it is quite frequent in John where Jesus is addressed by the word at 1: 36–8, 49 by two disciples and by Nathanael. The evangelist explains that the Hebrew word means ‘teacher’, and in 3: 2 Nicodemus calls Jesus a rabbi because he can perform ‘signs’. Members of the crowd call him rabbi after the feeding of the 5,000 (6: 25). When Mary Magdalen encounters the risen Jesus, she first mistakes him for a gardener and calls him ‘sir’ (Greek, kurie) but when she recognizes Jesus he is Rabbouni, ‘my Teacher’ (20: 16).
The use of the word in Mark and John conveys a suggestion of Jesus' public ministry and puts him on the same level as the scribes, with whom he debated (Mark 12: 28).