I wouldn't interpret it as tail wagging like a dog would do. I haven't seen that. Does it happen often? If you could post a photo of his tongue it would be helpful. They usually have a change in color toward the tip or edges of the tongue though so it's not necessarily a problem. Is he eating well? That would be an indicator of if it's bothering him or not.
Tail wagging in a lizard, like a dragon or monitor or skink, usually means it's displaying it's alert and perhaps really enjoying something it's doing (usually seen when eating).
I've seen eastern water skinks, delicate skinks, rainbow skinks, 5 lined grass skinks, eastern and central and lawsons bearded dragons , jacky dragons, nobbi dragons, water monitors, lace monitors , sand monitors and others all doing this in the wild.
My beardie does this ALL the time! He does it a lot when I stroke his tail, and does it sometimes when I walk up to him, or even when he just sees me. It's mostly random, except he does it every time I stroke his tail... I've also wondered about what it means