sticking tongue out - concentrating, tongue is at the side of the mouth          sticking tongue out - rude, tongue is in a central position, and greatly extended          sticking tongue out - concentrating: tongue is at the side of the mouth, also notice the quite crude palmar grasp of the writing/drawing instrument

Tongue protrusion.

The gesture of sticking the tongue out between the lips

There are two types:-

a. In the first
the tongue is protruded at one side of the mouth
the child is looking at what he is concentrating on

This is to be interpreted in this way, the gesturer is 'saying'

"My tongue is not in use, as anyone can see. I will not be using it, (for talking), I'm busy, e.g. with my hands, don't talk to me".

b. In the second
the tongue is protruded in the middle of the mouth
the child is looking at a person

The meaning is closely related to the one above but now the meaning is directed specifically to the person the tongue protruder is looking at and directing his or her tongue at. We can regard the person as saying:-
"I'm directing this meaning, applying it, to where my tongue is pointing, to a specific person, to you, the person I'm looking at.
Don't bother me, don't talk to me, don't interact with me, go away, I don't want to talk to, play with, or be with you".
Hence the gesture is now a rude one.

How are we to classify these gestures?

It would seem certain that type b. is quite a conscious gesture and perhaps more so than type a. In type a. the person 'puts his tongue away', but in a rather strange place, (not the normal place?), i.e. between the lips. Were the tongue to be put away in a more natural and usual place i.e. in a central position in the mouth cavity, it would not be seen unless the mouth was open, and even then the gesture would not be a striking and attention-getting one.
The person, (usually a child, in both cases, a. and b.), wishes to show that their tongue has been put away, and will not be used, for the time being.

We can compare this with the gesture of the s.l.d. girl who puts an examiner's testing object away in its case, and then gives this and other test objects to the psychologist to show that she wishes the objects not to be used, (perhaps any more), and by extension for none of the examiner's test objects to be used, for the testing session to be at an end.
Or with the boy with expressive communication problems who was being tested with the W.I.S.C. III. After completing an item of a manual task, the Block Design sub-test, he would lean back in his chair and fold his arms. He was, in a sense, 'putting his hands away', just as he might show that he had finished playing with some inanimate object, e.g. a jigsaw puzzle, by putting it away in its proper cupboard or drawer etc. This was done to signify to the psychologist that he had completed the task, and had no further need to use his hands, at least for the next few seconds, until the next task was given to him. The boy's communication consisted of
a. his signal that he did not need or wish to use his hands
b. his awareness that he worked on the design and his belief that it was correct and his knowledge that the psychologist was aware of the situation
Therefore from a. and b. the communication becomes "I have completed the task, I think successfully." (Possibly there is also an implied desire to be told if it is correct and be given recognition if it is. Also involved here are facial expressions of a positive kind).
Of course the above leaning back and arm folding, in the different context of a child not even beginning the task would mean "I am not using my hands, I don't intend to, I don't want to do the task".

Other children might turn around in the chair with their heads and eyes away from the table where the task materials are placed. This again would mean that the child doesn't intend to do the task, since he does not intend to use his eyes for that purpose; this organ, together with the hands, being essential objects in carrying out a visuo-motor, manual task.
Note also that the behaviour has a kind of backward implication, rather than a forward one. When a child gives his mother the car keys, the meaning stretches forwards to the trip in the car, and e.g. the arrival at the shops etc. On the other hand the putting away behaviour refers to the previous stage of attainment of the goal, the successful completion of the task by the child, (in his opinion). "I have put things away, things used in the activity, because I have finished the activity". This backwards implication would appear to be a higher form of t.ra. communication than the forwards type, which seems closer to mere conditioning.
This behaviour involves a negative.

How to classify these tongue gestures?
The communication involves the visual perceptual system. The expressive communicator assumes, rightly, that the other person sees what he is doing and draws the same implications from it that he does. These gestures are a form of t.r.a.

This is one interpretation

Another is this:-

It has been said that babies show rejection of the nipple of the breast or the teat of the feeding bottle by moving the head from side to side, thus moving the teat out of the mouth.
This is then said to be the primitive basis of the head shake gesture to mean 'no' in general, the negative. But this view appears to be flawed. The rapid and vigorous head shake is seen in Mr Thursday my new baby, apparently to get a better grip on the nipple of the breast, or the teat of the milk bottle.
'No', for him would not be naturally based on a side to side movement of the head, quite the contrary.
His rejection of things in his mouth, as with other babies, e.g. the nipple of the breast, or the teat of a feeding bottle, is seen in tongue protrusion.
So here is another view of the basis of the negative 'no', = "I do not want this in my mouth", as tongue protrusion. Later it coud be generalised to "I do not want other things, not just things in my mouth", or the things not wanted in the mouth might be generalised to other things, and perhaps not just material things but reified activities, such as speech. This is commonly represented as a noun in languages, but is really properly represented by a verb, to speak.
The tongue is being used to push unwanted things out of the mouth, concrete physical things such as food, drink etc or abstract reified 'things' such as 'thought', (really thinking). In pushing things out of the mouth the tongue might at the same time be moved out of its natural place of use, in speaking, and be put away, out of use.
See the views of Woodworth and Schlosberg
As Freud said, behaviour is multi-determined and there may be, and probably usually are, more than one causative factors producing an effect or result in behaviour, and by the same token, more than one explanation or interpretation of some piece of behaviour. So both the above views may be viable explanations, and at the same time.
Of course such multiple explanations must not be incompatible or contradictory.

For similar ideas look at

Scratching the head