The LANG, LC_CTYPE and LC_ALL are special environment variables which after they got exported to the shell environment (help export), they are available and ready to be read by certain programs which supports a locale (natural language formatting for C).
Each variable sets the C library's notion of natural language formatting style for particular sets of routines, for example:
LC_ALL - Set the entire locale generically
LC_CTYPE - Set a locale for the ctype and multibyte functions. This controls recognition of upper and lower case, alphabetic or non-alphabetic characters, and so on.
and other such as LC_COLLATE (for string collation routines), LC_MESSAGES (for message catalogs), LC_MONETARY (for formatting monetary values), LC_NUMERIC (for formatting numbers), LC_TIME (for formatting dates and times).
Regarding LANG, it is used as a substitute for any unset LC_* variable (see: man locale).
See: man setlocale (BSD), man locale
So when certain C functions are called (such as setlocale, ctype, multibyte, catopen, printf, etc.), they read the locale settings from the configuration files and local environment in order to control and format natural language formatting style as per C programming language standards (see: ISO C99)
See also: C Library - .