The words idioma, lengua and lenguaje can all be translated as "language".
Are they interchangeable? If not, what are the differences among them? When to use which?
Quoting this Wordreference thread:
So lenguaje is referring to communication in a broader sense.
You can say "lenguaje no verbal", "lenguaje de los ojos" but not
With languages, you can say idioma español, lengua española and lenguaje español.
As you've noticed, they're interchangeable in many contexts.
I observe that Natural Language Processing and computer language are always translated with lenguaje. Abstract usages like "body language," "pattern language," and "the language of color" call for lenguaje, as does the discussion of languages in general. A slightly antique usage, habla is close to lenguaje but earthier and less abstract sounding; it is not as common today in this sense as the other three words here discussed.
A specific language, on the other hand, is lengua or idioma. So far as I can tell from daily use, the principal difference is that one is Greek (idioma) and masculine and one is Latin (lengua) and feminine and a synonym for the anatomical tongue. That will matter if you ever need to use them in poetry, but in pragmatic speech they're used the same.
They seem close in Google Ngram when you consider the additional uses of lengua for tongue (mostly: delicious beef tongue!). I had the feeling in Mexico that idioma was more common, but I trust Google Ngram more than my subjective impression. In any case, the difference in usage is small.
The classic Sinónimos Castellanos by the great lexicographer Roque Barcia has this to say about lengua and lenguaje:
And about habla as opposed to idioma:
Also see Randolph's abridged extract from the RAE or the original RAE.
In Mexican Spanish we use "idioma" if we talk about a foreign languaje for example English, French, etc and "lenguaje" the way we communicate, the way we use the words, wen can have a corporal languaje or another, and lengua we use for example in lengua española, lengua is often used in the grammar books but we do not use it very often.
I hope this helps