Updated: Jun 26, 2022
In one version, there was a asura called Raktabija (meaning blood seed) who had the magical ability to produce a double of himself instantly with every drop of his blood that was spilt. In a battle between him and goddess Durga and her associate warriors 'Matrikas', they were overwhelmed with the numerous duplicates he produced every time he was wounded.
Goddess Kali, on the request of Durga, stepped in, spreading out her tongue all over the battlefield to not only lick all the blood at one go, but also suck the blood out of the demon and render him lifeless!
That's why she is always portrayed with her tongue out.
However, some versions dispute this reasoning. As per them, the story does not end with the killing. Apparently, after Kali had killed the demon, the goddess had gone mad with bloodlust and she went about destroying everything that came in her path. The gods became scared and turned to Shiva (considered her husband) for help. Shiva tried to pacify Kali, but was unsuccessful. In the ongoing commotion, he lost his balance and fell to the ground, and Kali accidentally stepped on him! And that was when she put her tongue out; it was actually an expression of her embarrassment!