The Thai wai is not just a greeting or way of saying “hello”, but an action of respect that represents the social status of the recipient.
That said, you will witness exceptions to this rule. For example, you might see a Thai person return a wai to a child out of fun or affection, but as a foreigner you shouldn’t, and instead should stick to the guidelines set out below.