A directly stuck-out tongue is a gesture of contempt.
It would once have been more offensive than now, but because it is now mostly associated with children, it will often be taken as childish teasing rather than an earnest insult. It is this level of cheekiness that Einstein was presumably aiming at.
The origins are lost. Lévi-Strauss suggested it may originate from babies rejecting food or a breast by pushing it out of their mouths with their tongue, which seems plausible enough, but impossible to prove or disprove.
A variant adding a wagging gesture combines this with a simulation of cunnilingus*, combining the rebelliousness of the tongue-out gesture with a boast of sexual prowess. Gene Simmons use of this in KISS made it a piece of rock-and-roll imagery copied by others.
There's certainly a matter of language in a way, in that the gesture and other tongue-out gestures mean very different things in some other cultures: In the Maori Haka (and adopted into use by New Zealand rugby teams) it's an expression of fierceness (and I think can have other meanings aside, but don't know for sure) and in Tibet it can be a sign or respect. As such it's a learned signifier and hence language, rather than universal.
*Pretty bad cunnilingus. I've always wondered about the utility of a boast of sexual prowess that seems to suggest "I give head with a tongue flapping like a plastic bag caught in a draft, and am so ignorant of how lousy this technique is that I even boast of it".