How to create a hook for a module in a theme?
I think this style of theme hook is deprecated in Drupal 8. From the API docs:


  Theme functions are deprecated in Drupal 8.0.x and will be removed before Drupal 9.0.x. Use Twig templates instead.


So since there doesn't exist a theme function theme_links(), the functions MYTHEME_links and MYTHEME_links__language_block would not be called.

You can still customize this output by adding a links--language-block.html.twig file to your theme.

You can also utilize preprocess functions (MYTHEME_preprocess_links()).