Generally it's the bit.
It's the horse's way to express discomfort or pain.
To check, take off any nose bands and ride, if he opens his mouth and is all over the place, you have the answer, and something you need to work on.
Pressure from their bit in their mouths is obviously uncomfortable so a lot of horses stuck their tongues out to avoid the pressure or relieve it. Keeping the nose band loose and soft hands teaching them to soften their jaw and understand that they have no need to put their tongue out can help. Some just have a habit or horse problem like Brenna said
He probably either has a tooth issue, or just likes to stick their tongue out of their mouth- we have a horse whose just always done that
It can be a teeth problem, a bit problem... Maybe the bit doesn't correspond to him and he has a problem that he is trying to reduce by keeping his tongue out. Try to ride him once with a halter to see if there's a difference and be sure if it's the bit or no. It also can be a back problem. I also know some horses are pretty weird and have fun when keeping it out, I know one like that!
It can be a teeth problem, mine put his tongue out in the left side because he had a a pointed tooth and it hurt him. So we made it filed and he is fine now.