It was in the very first incarnation of D&D. Witness ye, the words of OD&D (Men & Magic) from 1974:
Magic-Users: Top level magic-users are perhaps the most powerful characters in
the game, but it is a long, hard road to the top, and to begin with they are weak,
so survival is often the question, unless fighters protect the low-level magical types
until they have worked up. The whole plethora of enchanted items lies at the
magic-users beck and call, save the arms and armor of the fighters (see, however,
Elves); Magic-Users may arm themselves with daggers only.
And therein lies your answer. A core part of D&D balance from the beginning has been that wizards wield incredible power but are fragile physically and can't use armor or most weapons. Gygax made that a part of the game, as it was how he envisioned his fantasy world grafted to a wargame to work.
The in-fiction justification back in the day for this restriction was simply that 'that class doesn't get around to learning that." Proficiencies as a formal idea that you could take instead of just having a monolithic bundle of abilities based on your class didn't come till later. If you dual or multi-classed, you could cast wizard spells in armor just fine by the way, there was originally no real inhibitor except that "wizards don't learn that in wizard school."
However, even "proficiency" is a compelling argument - armor's not "just clothing." Untrained people put on wetsuits, climbing harnesses, etc. in laughable, inefficient, binding, and frankly dangerous ways. Football players spend a lot of time micromanaging their pads and helmets and learning to move in them. The idea that "I'll just slap this armor on it'll be fine" falls down when its specific adjustment is what keeps you from getting bones broken from deflected blows, or from it getting caught on the battlefield/foes/weapons and dragging you to your doom.
One can also argue the influence of genre tropes (Gandalf didn't wear armor!) on this long-standing trope, but that's pretty much an opinion-fest, and is already on this SE as a closed question: Where does the stereotype that wizards can't wear armor come from?
Armor Across The Editions. According To The PHBs
0e, 1e, and 2e: Magic-users couldn't use armor because they weren't trained in its use, period. They are busy learning spells from books instead, and armor is a bit binding and impedes somatic components. Races that could multiclass or dual classing in general let you cast magic-user spells in armor.
3e, 3.5e, and Pathfinder: Magic-users can gain proficiency in armor but even then there's a spell failure chance for spells with somatic components because of armor's restrictive nature.
4e, 5e: Armor has no specific effect on spellcasting, though if you're not proficient you take various penalties to everything including spellcasting.
As you can see, the approach has really been quite consistent. Even before there were proficiencies, and after, the general explanation is "if you aren't proficient in armor, then you will have trouble with your spells," though that penalty has lessened over the years. It's a mix of game balance and realism - the same reason a wizard doesn't know armor and weapons is the reason a warrior doesn't know spells - in life, you have to make choices about what you learn, and "all of it" is not a feasible answer, at least not as a 16-year-old starting adventurer! In earlier editions it was harder to learn things in general as it was very class-based; now that there are proficiencies and stuff a wizard can learn armor like anyone else, by making that tradeoff to not learn something else useful.
Best Answer
The idea is older still: it looks like it came to D&D via Dave Arneson's Blackmoor
The dragon, a large mythological beast, is found in a variety of story telling traditions from multiple cultures. Some breath fire ("Smaug the Golden" being an example), some are just big and nasty (St George and the Dragon), some breath poison, and some are mystical beings who can shape change into human form. (Chinese myths and legends). Tolkien referred to a cold drake being killed by one of the ancestors of the Rohirrim (LoTR), and Ancalagon the Black being the greatest of flying dragons(Silmarillion, First age). In most stories, one dragon is villain enough.
As I touched on in this answer, dragons ended up in D&D as an eclectic mix of creatures inspired by a multiple story telling traditions. Putting multiple kinds and colors of dragon into one setting wasn't original to D&D, insofar as a story idea. The novel Dragonflight, published in 1968, was the first of the Pern dragon novels by Anne McCaffrey. She had multiple hues of dragons flying about, interacting with dragon riders and other characters while battling the Thread that threatened Pern. The various colored dragons had differing status and personality types based on color1. (I read the book in 1975).
Game-wise, whether or not this setting inspired Gygax, Arneson, and TSR is unknown, but it's likely given the wide variety of adventure stories, sci-fi, fantasy, swords and sorcery tales, legends, and speculative fiction that inspired and provided ideas for the fantasy game in the first place. Multiple kinds and colors of dragons in the game's lore may be a first for a game, (Blackmoor/D&D) but Pern certainly predated it in literature. That dragons in general were described differently in different story telling traditions for millennia makes the general idea very, very old in the treatment of this iconic creature.
Blame it on Blackmoor
Was it a "first" in D&D as published or from something earlier?
From a post at Dragonsfoot: (Poster Harvard, Fri April 27, 2012, 10:48 am)
It appears that Dave Arneson and Richard Snider were the first to use dragons of different sizes, colors and breath weapons in an RPG. These were in the Blackmoor campaign (1970/1971) time frame (-Harvard- calls it the "proto" D&D era for Blackmoor) which is three years before Dungeons and Dragons was first published.
1From the summary at Wikipedia, which squares with what I remember from the story. Dragons with different colors had differing personality templates.
That idea wasn't cut and pasted into D&D. There were no "red dragons" in Pern: they breathed fire /phosgene gas after chewing on certain rocks. Anne McCaffery wasn't writing a game, she was telling a story that took that which was familiar from older story telling traditions -- flying dragons that breath fire -- and folded it into a sci-fi setting in a novel way.