Android: If you want to share your Wi-Fi network with other Android users without having to give out your WPA passcode, you can use the previously mentioned Wifi Joiner app which generates a QR code for your network, but that requires the other user to have Wifi Joiner installed too. Another QR network option is to use Barcode Scanner, which is a more versatile app. Here's how.
To create your QR code, head over to ZXing Project's QR Code Generator site (ZXing are the developers of Barcode Scanner).
In the drop-down, select "Wifi network", then enter in your SSID (network name), password and network encryption type (e.g. WPA/WPA2).
Once you click the Generate button, you'll get a QR code you can save and print out if you like.
Your friend will need to have the free Barcode Scanner app. To connect to your network, all he/she has to do is scan the QR code.
The nice thing about this method is Barcode Scanner has a lot of other uses, such as looking up product prices and sharing apps via QR codes, and your friend might already have the app installed. You get to keep your Wi-Fi network password private and make it much easier for your friends to join your network.
Thanks for the tip, stormgren!