Up until yesterday (with Snow Leopard), closing the lid would cause my MacBook to sleep whether or not the external monitor was connected.
Since upgrading to Lion last night, closing the lid when the external monitor is attached just tosses all windows to that screen and keeps going.
I realize I can sleep via the Apple menu or keyboard before closing the lid. I'd rather not have to, and I'm wondering if there's a setting to restore the sleep-on-close behavior.
Best Answer
edit: See this as the behaviour has changed: Why won't closing the lid sleep my MacBook Pro with external monitor attached after upgrading to Lion?
There are two groups of people. Those who wish to have dual displays and have closing the lid go into sleep and people who wish to disable the monitor display, close the lid and use the external monitor as if you had 'docked' with it.
Previously, if you wished to switch from the macbook to an external monitor entirely then you had to perform the following to put the laptop into clamshell mode:
source: http://support.apple.com/kb/ht3131
So to put the machine in clamshell mode required you to put it to sleep and wake it back up again. As far as user experience goes, that is somewhat jarring.
As you have the other options to put the machine to sleep, it seems very likely that this change will remain.
Right now, there is no way to alter this behaviour.