If you really want to be sure, go to www.ipchicken.com in Safari. If you're connected over wifi, it will show that you're connecting from the ISP connected to that wifi network. If you're connecting over 3G, you'll see your service provider's domain.
When you use an iOS app or feature that uses the Internet, your iPhone, iPad, or iPod attempts to connect to the Internet as follows:
Your device connects to your current Wi-Fi network if available.
If not available, your device attempts to connect to any nearby Wi-Fi networks you have previously used.
If there are no previous Wi-Fi networks in range, a list of available Wi-Fi networks appears. You can tap to join a Wi-Fi network, and if necessary enter the password to join it. Note: Wi-Fi networks that require a password are indicated by a padlock icon next to them.
If no Wi-Fi networks are available or if you choose not to join one, iPhone and iPad (cellular models) connect using an available cellular data network.
In the Android world, wi-fi, when available and connectable, always trumps the data connection.
Though it is interesting to note that the Facebook app for Android sometimes seems to connect to the 3G network briefly when launched even if Wifi is in use. I'm not sure why - maybe to assist GPS in getting the location?