It is believed the Thai wai originated during the Sukhotai period, around A.D. 1238, the wai is also widely used in countries such as India and Nepal which have had a large influence on Thailand, maybe the Indian, Nepal influence coincided with this period.
Did the Thai Wai evolve from war.
Another chain of thought is that the Thai wai was used as a greeting because both hands had to be used and no weapons could be concealed. Considering the many different ethnic groups which have come to form what is now Thailand this might be viable, Thailand has fought numerous wars with neighboring countries from which many of these ethnic groups come from.
Could the Thai wai have it’s roots in Buddhism.
Buddha and Buddhist Monks are always given a wai, a very high wai which represents utmost respect, so the wai could possibly have evolved as a traditional greeting used with the term “sawatdee” which means “good day”.
The wai and the Thai peer system.
Anyone who has stayed in Thailand for a long time is aware of the Thai peer system, basically you must show respect to your elders, superiors, parents etc. Someone older or with more authority than you will be shown respect in various ways, they will generally be called or referred to as “pee”, when you walk past them you should dip your shoulders. So it seems logical that the Thai wai is a continuation of the Thai peer system, the higher the wai the more respect.
Probably, the Thai wai has come to it’s present day state due to influences from all these things, that’s my opinion anyway. Got a theory of your own, you are welcome to add it the comments section.