Just having a long bus tour and asking me this question. In my head I can't really think of a plausible time to establish this documents on a wider spectrum...
Around the time of WWI, control of borders became a significant issue for many countries.
This led to a wider introduction of passports, for example in Britain, the first passports as we'd recognise them today, were introduced in 1914. They weren't necessarily popular (sometimes seen as dehumanising to exist as a description on paper only). Applying for documents also meant that the government had more control over who left the country than most governments do today - Emily Hobhouse, a prominent humanitarian of the period, for example, was only allowed to travel to Italy for health reasons, under strict regulations to not get involved in politics.
The biggest population displacements of all times (arguably) occurred as a result of WWI and countries then (just like they are now) are concerned about the "waves"/"tides" (notice the language around this) refugees arriving.
Germany for example, was concerned about refugees from Eastern Europe, with, for example, ethnic Germans wanting to come to Germany (which was typically allowed) but also large amounts of other, displaced people arriving. WWI had resulted in the break-up of the German Empire and the Hapsburg empire (Austria-Hungary) and the result of new nation states emerging. However, populations don't live in clearly, neatly divided section of lands and a nation state would expel those not desired in this nation.
Those people, now stateless, were obviously in need of somewhere to go but without any way of being identified. This led to the introduction of the Nansen Passport, a document issued by the League of Nations (a forerunner of the UN) which allowed state-less people to have identity documents and move to their country of destination.
The league of Nations and later the UN held several conferences about the concept and implementation of the passport, however, the standardised passport we see today wasn't around until the 80s. (And I will leave someone else to pick up the story there as that's outside my field of expertise.)
For more information:
Marrus, Michael, The Unwanted: European Refugees in the Twentieth Century. New York: Oxford University Press (1985)
Annemarie H. Sammartino, The Impossible Border: Germany and the East, 1914–1922. Cornell University Press (2010)