As you no doubt already know, L1 refers to your first or native language, and your L2 is a second language. Your L3 language would be your third language, and so on. Where and when did the actual terms "L1" and "L2" originate? I researched on the Internet but I couldn't find a direct source.
H. H. Stern in Fundamental Concepts of Language Teaching traces the L1/L2 distinction back to the 1959 article, The teaching of English as a foreign language by J.C. Catford:
The ‘L1’/‘L2’ distinction was introduced by Catford in 1959. ‘One may, for convenience, use the abbreviation “L1” for primary language, and “L2” for secondary language. L1 is usually, but not always, the language first acquired in childhood: it is the language of its speaker’s intimate everyday life: it is also to a large extent the language of counting and other forms of self-stimulation, or “thinking in words”. Most people-that is all except perhaps ambilinguals- have only one L1, but they may have a number of L2s, each perhaps being reserved for one particular purpose, as, for instance, reading scientific papers, enjoying a Mediterranean holiday, reading the Scriptures.’ (Catford 1959: 137-8) The L1/L2 distinction became popular, particularly in Britain, in the sixties (Halliday, McIntosh, and Strevens 1964:77-9). It has maintained itself and is now quite widely used in professional parlance in the English-speaking world.
Before 1959, L was already used to mean "language", especially in formalistic descriptions (e.g. Chomsky's 1957 Syntactic Structures). The earlist use (that I could find) of the name L2 to denote language (though not a second language as we understand it today) was in the 1953 English translation of Formal and Factual Science by Rudolf Carnap. It's hard to say whether these uses of L and L2 influenced Catford.