Pineapples contain A protease enzyme that is known as bromelain.
The bromelain breaks down protein and it's also used to tenderize meat naturally.
This bromelain doesn't effect everyone who eats pineapple but your tongue could be more sensitive than other peoples tongues and that could be why your tongue burns when eating pineapple.