Type hinting - which is better, UserInterface or AccountInterface?
UserInterface extends ContentEntityInterface, EntityChangedInterface, and AccountInterface. This means there are methods an object implementing UserInterface needs to have but objects implementing AccountInterface don't need to have. For example, there is UserInterface::hasRole(), but AccountInterface::getRoles(); in the first case, there is a helper method allowing to check the object has a specific role, while in the second case you would need to write your code for that, getting the list of the roles with AccountInterface::getRoles().
Which hint should be used is given from the documentation. For example, hook_user_logout() gets an object implementing \Drupal\Core\Session\AccountProxyInterface, since it gets the object returned from Drupal::currentUser(). See user_logout(), the function invoking hook_user_logout().
  $user = \Drupal::currentUser();

  \Drupal::logger('user')-&gt;notice('Session closed for %name.', array('%name' =&gt; $user-&gt;getAccountName()));

  \Drupal::moduleHandler()-&gt;invokeAll('user_logout', array($user));

Sometime the documentation for a hook doesn't show a specific hint, such as in the case of hook_user_login(). In this case, it could help to see which hint is used from the implementations of that hook, for example system_user_login(), which uses UserInterface as hint for its argument.
When you aren't sure about the correct interface implemented by the object passed to a function (including a hook), use the most generic one as hint. In the case you describe, that would be AccountInterface.