I have an HTC Desire with Android 2.2.
My problem is that there may be open Wi-Fi networks nearby that require a password once connected, e.g. hotspots at coffee shops. My phone connects to these, thereby blocking the 3G connection.
What I want to do is always use 3G unless I'm in range and connected to a list of certain Wi-Fi networks.
Go into your Wi-Fi settings. Long press on the networks that you don't want to automatically connect to and tap 'Forget'.
You could try Wi-Fi Ruler.
With Wi-Fi Ruler you can set up which access points you want to automatically connect to and which ones to ignore.
This might be good if you want to remember the settings (just in case you want to connect again) but still avoid connecting to the AP.
I suggest that when you disconnect to a wifi network, you also forget it.
It will not connect to a WiFi network that you have not explicitly connected to in the past, so as long as you forget the WiFi network, it won't connect.
I regularly find myself doing this, although I rarely turn my WiFi on.