In-universe, the Klingon language is one that evolved naturally on the Klingon homeworld;
There are various accounts within Enterprise and TNG of "ancient Klingon" and "medieval Klingon", suggesting a linguistic tradition that goes back tens of thousands of years and that pre-dates recorded and written history...
TARQUIN: Have you had a chance to look at the book I gave you?
TARQUIN: What did you think of it?
HOSHI: It's an interesting language, reminds me of medieval Klingon.
Mark Okrand, the creator of the Klingon language offered a potted history of the evolution of the (now-unified) single language in his Klingon for the Galactic Traveler:
"The current linguistic situation in the Klingon Empire is a rather
complex one that can be somewhat better understood in the light of a
bit of history. Klingon mythology holds that over 1,500 years ago,
Kahless the Unforgettable actually created the Klingon Empire by
overthrowing the tyrant Molor. [...] Before Kahless united them,
however, the peoples of Kronos, the Klingon Homeworld, consisted of
disparate groups [...], with different customs and sometimes different
languages. As the Empire expanded, as other planets were [...]
conquered or incorporated, an even greater number of distinct cultures
and languages became part of the overall mix"
"In terms of language, there are regions within the Empire where the
ancestral languages are still spoken, though in a somewhat changed
form. In short, within the Empire there are several languages, and the
major languages (that is, those with the most speakers) are spoken in
a number of versions or dialects.
The official language of the Klingon Empire, the language used for all official purposes, descended from that spoken by Kahless (and,
for that matter, also by Molor)."
(edited for brevity and clarity)