If you want to go beyond System Preferences and change other settings on your Mac, you can do so with the Terminal window. But TinkerTool makes it even easier by giving you a list of potential settings and a user interface to make the changes without typing.
Check out MacMost Now 827: Using TinkerTool To Customize Your Mac at YouTube for closed captioning and more options.
You can get TinkerTool at http://www.bresink.com/osx/TinkerTool.html.
Can TinkerTool, or any other app you're aware of, allow a Macbook Pro to logout or screen saver lock upon closing the lid?
Currently OS X does not seem to have this option.