If you are making a ticketed, direct connection through BKK, you will not have paid the Thai departure tax in your ticket.
If you go landside, for whatever reason, you'll be expected to pay that departure tax when you return airside - even if you've already been issued with a boarding card for your next flight.
It's an odd situation: at most other airports you are allowed a specific time window, airside or landside, as a transfer passenger. However it's also a well-documented situation, discussed in the Thai forum, and a situation I have fallen foul of.