Since I brought home my 3G + Wi-Fi iPad a little over a week ago, I've been running in Airplane Mode with Wi-Fi enabled to avoid using cellular data. Otherwise I kept getting a prompt (shown here) asking me if I wanted to setup an account, which I didn't want to do.
Fortunately, there is another way. Go into the Settings application and tap on "Cellular Data." This brings up an on/off switch for Cellular Data and Data Roaming. Turn both "off" and you will not be prompted to sign up for a data plan when Wi-Fi is unavailable.
Airplane mode disables not only the cellular data, but also Wi-Fi, Bluetooth, and the GPS. If you are only trying to avoid using cellular data, there's no need to use Airplane Mode.
If you have upgraded your iPhone to iOS 4 then you also have the ability to disable cellular data under Settings » General » Network » Cellular Data, which may come in handy if you have a metered account with AT&T.