If you've got an Android smartphone or device, it's quite probable that you've come in contact with a way of configuring WLAN access by scanning a QR code. WiFi password handshake via QR code is also quite common when your DSL router is a fritzbox - so you might know it from there. I don't know if there's a similar protocol or means of setting up WiFi login + password on the iPhone, apart from entering it manually.
Anyway, on Android there's such a facility. It is possible to configure your phone's login/password by scanning a QR tag which has the relevant credentials embedded. I don't know if this functionality is a very mature standard, or where the official docs reside, but it works by encoding a text string of the following format as a QR pattern:
String code = "WIFI:S:<network-ssid>;T:WPA;P:<wifi-wpa-key>;;";