You can easily add such functionality with just a few lines of JavaScript. All the JS does is change the password input box from type password to type text (and back).
I'd probably add the JS function to the script.js file and then the needed checkbox to the login.template.php file.
The JS would be something like
function showPass()
{
let show_pass = document.getElementById('passwrd');
if (show_pass.type === 'password')
{
show_pass.type = 'text';
}
else
{
show_pass.type = 'password';
}
}
And to use it add the checkbox after the password input box in the login form along the lines of (depends on what the current markup is)
<dt>
<label for="showpass">', $txt['show_password'], ':</label>
</dt>
<dd>
<input type="checkbox" id="showpass" onclick="showPass()" />
</dd>
You would also need to add the definition for $txt['show_password'] to the language file.