'AutoLock' option in Diamond Tweak will do this. Basically locks whenever the device goes into standby. Also doesn't require an entire app to do this, just a simple tap or two in Diamond Tweak.
DiamondTweak
http://forum.xda-developers.com/showthread.php?t=409540
otherwise, if you don't want to install DiamondTweak, the reg change you need to make is '
HKEY_CURRENT_USER\ControlPanel\BackLight\AutoDevic eLockEnable' change from 0 to 1. This will also lock your device if say the backlight goes out for another reason e.g. timeout