Immunity is not formally defined beyond its natural language meaning
From Monster Manual, page 8:
Some creatures have vulnerability, resistance, or immunity to certain types of damage. Particular creatures are even resistant or immune to damage from nonmagical attacks (a magical attack is an attack delivered by a spell, a magic item, or another magical source). In addition, some creatures are immune to certain conditions.
This relies entirely on the natural language definition of "immunity" though, since it doesn't explicitly say that it results in the creature taking no damage if the damage type is one that it is immune to.
Note that the quote above also mentioned immunity to conditions. This kind of immunity would of course not involve "taking no damage", so perhaps the designers didn't formally define it as a game term because they are using the term for multiple purposes, and they felt that simply using its natural language definition would be simpler?