Can you connect USB devices to an Android phone? I have an HTC Desire and would like to connect USB devices to it, for example an external USB thumb drive to transfer files or a USB keyboard.

Is this at all possible?
You want USB host mode, which requires Android 3.1 (and up) and hardware support.

Android before 3.1 does not support USB host mode. i.e. you can't connect things like USB Thumb drives, keyboards etc.

However, for the Nexus One, someone has managed to modify the Android kernel to hack USB host support to the Nexus One running Android 2.2 (although apparently this hack will also work on 2.1):


Nexus One USB Host driver


And similar instructions for the HTC Desire: 


http://forum.xda-developers.com/showthread.php?t=702742