You have to clarify this question more. Do you mean to ask when did language invent formality? That we can't possibly know because written language, relative to language itself, is very new. Do you mean when did the word please and thank you become popular in English?