When a command is started, it is sent a list of environment variables by the shell. This list provides a way for commands to access a consistent source of information about who the current user is, what their home directory is, what this user's standard printer is, etc. The name of the user's preferred text editor. Many programs which need to invoke an editor, like email programs, will use one of these variables to determine which editor to use. Many programs that need to page files, like email programs, will use this variable to determine which pager to use.
Most shells have their own built-in versions of commands to list and set environment variables.
It is usually better to use these built-in commands where possible, as they involve less overhead and thus are more efficient.