Assistive technologies, like screen reader software or Braille displays, need to know the language of written text to speak or display it properly. If it hasn't been coded with that language, then the technology might not be able to determine what voice/language to provide, and the user might miss the correct pronunciation, accent, spelling, etc.
In most cases, the language of the web page as a whole will be determined for you by the template/theme you use. If you are responsible for your own website, you should always make sure the language of the page has been coded. Learn more about how to Declare Language in HTML.
3.1.1 Language of Page: The default human language of each Web page can be programmatically determined. (Level A)
3.1.2 Language of Parts: The human language of each passage or phrase in the content can be programmatically determined except for proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text. (Level AA)
For web pages with content in multiple languages, such as a page to teach intro foreign languages, you will need to code sections with the proper language attribute so that assistive technology can determine when to switch between languages. Learn more about Using Language Attributes to Identify Changes in the Human Language.