The PostgreSQL database server needs to be able to resolve the 'localhost' name for it to run. On some Windows Vista installations, the HOSTS file seems to be missing the localhost entry (usually it is there, but it seems to be a common problem for it not to be there).
To resolve this problem, find Start → Programs → Accessories → Notepad, and right-click Notepad, and choose Run as administrator. Then, choose File → Open in Notepad, and open c:\windows\system32\drivers\etc\hosts. Add a line at the bottom saying:
Save the file, and that should resolve the problem.