I'm pretty much quoting an earlier answer I gave here, but it is still valid. You didn't mention what type of device you are using, and this answer is specific to Android. Hopefully it helps:
If you are rooted, or are willing to root your device, you should be able to use a file manager (ASTRO, Root Browser, etc.) to find the WiFi password.
Use the file manager to locate your data/misc/file folder, then look for wpa_supplicant.conf, or I assume it could be wep_supplicant.conf if your network is using WEP instead of WPA. Open the .conf file using a text editor (which is probably built into your file manager application, if not, add that to your shopping list). You should be able to read the password in plain text at that point.
"It is not the easiest of tasks to remember passwords for all the WiFi networks you use regularly. On most devices, once a password is entered for a hotspot, you can forget all about it as next time the device connects to it automatically. When you switch to a new device though, or have to tell the network’s password to a friend, things can get really tricky if you don’t remember it. On desktop computers and even Android devices, there are ways of viewing saved passwords for authorized networks without too much fuss. In the past, we have seen tools like SterJo that are capable of listing passwords for all recognized networks on your desktop within a few seconds.
If you are using an iOS device, though, there has never been any easy way of viewing old passwords for WiFi networks. However, jailbreak users can finally enjoy a solution to this problem, thanks to the newly released NetworkList tweak, which adds a list of all your saved WiFi passwords to the WiFi section of the Settings app.