WiFiKeyShare lets you easily share your Wi-Fi password by generating a QR code or by writing it to an NFC tag.
The QR code should be recognized by most barcode scanner applications (i.e. Barcode Scanner by ZXing) and the NFC tag is formatted in the same way as Android does since it introduced its "Write to NFC tag" option in Lollipop. That means people running Android 5.0+ won't have to download any specific app to connect to the network after scanning the tag.
You can also send Wi-Fi configuration via Android Beam: while on a Wi-Fi network screen, tap your device to your friend's device and a pop-up will appear asking if they want to connect.
Important note
Android does not let apps read the saved Wi-Fi passwords, so you will need to enter them manually for each network you want to share. However, the passwords will automatically be retrieved if WiFiKeyShare is given root access.
This app is free software: the source code is at https://github.com/bparmentier/WiFiKeyShare.
If you find any bugs, or the app isn't working as it should, please tell me by opening an issue on https://github.com/bparmentier/WiFiKeyShare/issues, sending an email to dev@brunoparmentier.be or tweeting to https://twitter.com/mau5kito.