Connect automatically to VPN when connecting to wifi access point?
ControlPlane
You want to have an automated action after you connect to a certain WiFi point. An easy way to do this, is using ControlPlane (formally known as MarcoPolo). This software makes your computer context aware and can execute scripts and programs when your location changes. Some examples that ControlPlane is aware of:

Current Audio Output device (headphones/internal speakers)
Discoverable Bluetooth devices
Advertised Bonjour (Zeroconf) services
Attached FireWire devices
Assigned IP addresses
Ambient Light level
Attached Monitors
Active Network Links
Power source (power adapter/battery)
Running Applications
Current Time Of Day
Attached USB devices
Visible WiFi networks

edit (21 aug 2014, thanks to @Rainer):
Marcopolo is now ControlPlane.
ControlPlane was created using code from version 2.5.1 of the MarcoPolo project still available at http://www.symonds.id.au/marcopolo/.  ControlPlane is a direct port of MarcoPolo and in fact, much of the configuration from MarcoPolo still works with ControlPlane, just better!
ControlPlane supports 32 and 64bit Intel based Macs running Snow Leopard through Lion.