The use case for sign-in and registration are different. When you're signing in you know your password (unless you've forgotten it), so the main reason for using plaintext is to prevent typing mistakes. However when you're registering you're entering new data rather than confirming existing data, so the potential impact of a typo is greater. This is why registration forms typically have a second 'Confirm password' field.
I engaged with this issue earlier this year when I re-designed a login/registration form for a client. My preferred design pattern was the mobile phone one Roger Attrill mentions where the last letter of the password is shown in plain text for a few seconds before being masked by a bullet. I did find some js plugins that replicate this behaviour for desktop, but they all had some shortcomings so I didn't go with this approach.
The solution I went with reflects the difference between sign-in and registration behaviour.
Sign-in
Standard masked password input. This reinforces a sense of security (as mentioned by kontur), but is prone to unnoticed typos. The overriding reason I stuck with this pattern though was it matches user expectations.

Registration form
Augmented password field with SHOW/HIDE button. No secondary 'Confirm password' input. This allows the user to show/hide their password, visually confirming what they've typed in. Being able to see your password means there's no need for a password confirmation field which keeps the registration form shorter and simpler.

The jquery code for this is: (apologies to non-jquery purists)
// Show/hide plain text password
$('#pw a').on('click', function() {
var $pw = $('#pw input.pw').not('.placeholder'), $txt = $('#pw input.txt');
var isNowTxt = $('#pw').toggleClass('plain').hasClass('plain');
isNowTxt ? $(this).text('Hide') : $(this).text('Show');
isNowTxt ? $txt.val($pw.val()) : $pw.val($txt.val() != $txt.attr('placeholder') ? $txt.val() : '');
isNowTxt ? $txt.focus() : $pw.prev().length ? $pw.prev().focus() : $pw.focus();
})
// and make sure the password value is correctly submitted
$('#pw a').closest('form').on('submit', function() {
if ($('#pw .txt').is(':visible')) $("#pw a").click();
});