Right click on the battery icon on the taskbar.
Select 'Preferences' from the resulting menu (which should bring up the XFCE4 Power Manager Preferences).
Set the desired action to perform when the laptop lid is closed ('suspend' = 'standby' I think). Make sure you set the desired action for both 'On AC' and 'On Battery'.
NOTE: If you don't have a battery icon on the taskbar you can access the 'XFCE4 Power Manager Preferences' from Menu --> Preferences --> Power Manager
If you do not have a 'Power Manager' entry under the 'Preferences' menu, follow amjjawad's excellent advice from this thread over on ubuntuforums.org.
In a terminal type:
sudo leafpad /usr/share/applications/xfce4-power-manager-settings.desktop
Replace this line:
With (add a # before the line):
Save the file and 'Power Manager' should now be in Menu --> Preferences.