When did waving to others to say hello or goodbye first enter the historical record as part of a culturally accepted form of human interaction?
I believe it came about before advanced human civilization. The waving of a hand is to get somebody's attention in the most effective and conservative way possible. Waving a hand can attract one's attention but at the same time is not overly conspicuous. This could have helped early civilizations when hunting or during warfare.