Your iPhone automatically remembers Wi-Fi passwords and will automatically join known networks, unless you have that feature turned off. There are instances when you want to be able to see these stored Wi-Fi passwords so you can get on the network with other devices. Unfortunately there is no way to view your iPhone's remembered passwords on the phone itself. You can, however, use the Keychain Access application on your Mac to view your iPhone's stored Wi-Fi passwords. Here's how to do it:
Though it has been around for several years now (since iOS 7.0.3), the iCloud Keychain is still new to some, and remains a source of confusion for others. If you are new to iPhone, or just haven't ever bothered with iCloud Keychain, it serves as a basic manager for your web logins (via Safari), your credit card information, and Wi-Fi network login information, and it keeps your Mail, Contacts, Messages and Calendar up to date across your devices as well. It will keep this information safely encrypted and allow access to it from your other iOS and OS X devices.