It happened by degrees.
If you rewatch the TOS episodes with the Romulans (particularly "Balance of Terror"), they were the ones who were obsessed with honor and duty. Klingons were all about treachery, deceit, and other villainous stereotypes. I believe that David Gerrold even said in his "Trouble with Tribbles" book that Klingons farted in airlocks, the fiends!!!
When the villains in TSFS shifted from the Romulans over to the Klingons, some of the Romulan "honor" dialogue was put into the Klingon Captain Kruge's mouth (we also shifted from Kirk's "Klingons don't take prisoners" in TWOK to Kruge outright saying, "I wanted prisoners!" when the Grissom is destroyed in TSFS).
When TNG came along, Robert Justman suggested that they put a Klingon on the bridge of the Enterprise, as a sign that the Federation had made peace with their long-time enemies, as predicted by the Organians in "Errand of Mercy." The honor thing worked well as an explanation of why we were now friends with the Klingons, so the honor thing became permanently grafted on to them and the Romulans became the shifty, deceitful ones.
In-universe, all I can speculate is that the smooth-headed Klingons did things differently from how the bumpy-headed ones did. When the bumpy-headed ones became predominant again, honor became more important in Klingon society.