Several OS X versions, passwords have been stored in an application called Keychain Access. So if you’re looking for a Password that you simply can’t remember, you’re in luck.
Keychain Access can keep track of all of the passwords associated with the computer such as applications,internet and web form password. If your Mac computer is connected to a Wifi network, the computer's keychain will keep track of the password tied to this network. Note that it works in Mac OS X 10.7 and later.
Step 1: Click Go -> Utilities
Step 2: Click Keychain Access -> Choose wifi that you want to see password
Step 3: Click on Show Password. Confirm your administrator username and password.
Step 4: You may be prompted to enter your administrator name and password again.
Step 5: The Wi-Fi password should appear in the text box next to Show Password.
If anything problem u can leave a comment :)