Turn off cellphone (SIM) radio
Once you've put the phone in Airplane/Flight mode, you can manually re-enable WiFi. (On my phone at least) this leaves WiFi on and the phone radio disabled. It does involve a couple more clicks but I think it achieves what you're after.

A quick look round the market showed a few apps that manage this setting for you, for example the "Airplane Mode Wi-Fi Tool" and "Airplane Autoswitch". Either of these may streamline the process slightly.

Airplane Mode Wi-Fi Tool QRCode:


Airplane Autoswitch QRCode: