Head bobbing happens as a way of getting your attention. In a very young bird, this might be because he's hungry and wants to be fed. If he is an older bird, he may be showing off and the bird equivalent of saying, "Look at me, I'm beautiful."