Getting a list of available WiFi networks is the easy bit, including signal strength etc. through the WMI API. Google it or try this URL for starters:
The difficult bit is using the list of available networks. I have yet to find any reasonable way to programatically connect to a given network. If you find a way (from within Windows) then I (amongst others) would be very pleased to know. Apparantly there are many tools that can be used from within Linux to achieve this....
I hope that this helps.