Sticking out your tongue, can mean many different things and is part of our body language as much as a pointing finger is.
So the meaning of this depends in the same way as a pointing finger depends a lot on the mimic, body posture and not rarely on context.
I did some research on the matter and found this article which I in its majority is inline with my personal observations and impressions I made while analyzing myself and others doing it.
Another disclaimer, I am from Germany. So in detail it might differ for France, but I think our culture is close enough, that most of this is likely to apply in the same way.
So answering your questions starting with your first one:
So, what does it means to children when someone sticks out their tongue at them (IRL)?
Specifically for babies it can also be an expression, implying high concentration.
I once watched an experiment in a German TV show called "Clever" where they wanted the audience to guide a thread into a very small eye of a needle. about 70% of the audience had been sticking out there tongue while trying to fulfill this task. Later on it was explained, that this is a reflex that has its use when being a baby (sadly I can't remember anymore what exactly it was useful for) and it just is a remainder for most people they still do, when ever executing a task that forces them to highly concentrate on precise motion with their body parts.
Also I can clearly imagining a baby just sticking out their tongue as an easy way to dispose of some disliked food. I am not sure if that leads to the next interpretation but I could imagine that's what it comes from.
Since for children this gesture is very often used as a basic way, to express i.e. disgust. Hence that's why its usually meant as an insult for children. Showing this gesture to someone usually expresses disgust or distaste towards someone what is for obvious reasons insulting.
That's so far what I know about children doing it.
Now to your next question.
And what does it means for adults (IRL)?
So I am sure also adults might use it as a ways to insult others by expressing their disgust. But to get it as such pretty much will be transported by how they express this gesture. So you couldn't really make out if it is meant as insult without reading their face and probably whole posture.
Since I have been dating a lot recently, I also encountered others doing it and have done so often myself in specific ways.
For one it is a way of cheekily mocking/teasing someone. Most of the ways adults use it is related to the childish way of using it as an insult and hence doing so in a confrontational way is often overarchingly seen as a childish thing to do.
So when I do it, I put a conversation I am having with someone on a childish level. But since adults usually don't perceive the offense in a way anymore as one was used to as a child, it also is in most cases clearly understood as mockery.
In the same way, I saw others using it and again have done so myself, to underline how childish I feel regarding a particular misstake I made. Like:
Friend: Did you just trip over your own shoelace?
Me sticking out my tongue to express that I feel childish for having this let happen
Another reason why I do this sometimes, but I struggle to find an explanation to why this suites the situation(if anyone can explain this, be so kind leaving me a comment on it). I do it if I want to generate an atmosphere of intimacy. When having a conversation with someone which feels like being emotional in some positive way, I tend to do it. I allways thought I am doing it as a matter of having a back off opportunity by adding some not so serious body expression. But after having read the article I have an impression, there is more to this.
Another way, I rarely (if ever) use myself but still seems very clear to me is, if someone sways their tongue up and down rhythmical. What is often to be understood as a overt sexual gesture due to given activity with ones tongue.
So far this is what comes to my mind, what I am doing this gesture for by myself. The linked article covers way more meanings which I am not mentioning here, since I can't relate to them myself. And again, as the article mentions as well, there are so many ways of using this gesture to express something, that it would be very difficult to create an exhaustive list of the meanings.
Coming to your last question.
Are the meanings different for children and adults?
As this might be concluded already from what I wrote about your former 2 questions. Sort of yes and no.
For a child it is obviously unlikely that they would use it in a way where the meaning is related to the childishness of the gesture itself. But an adult still might use it to express the very same what a child would be expressing with it. So if this constitutes to being a difference in the way adults and children use it might be a matter of interpretation. But I personally would interpret this as yes, there is.