Secure Settings is a complex Tasker/Locale plugin for rooted and non-rooted security conscious users alike. Version 1.3.5 of the app has gone stable, bringing with it a beefy changelog that should help the software play nicely with modern devices and give older handsets new perks as well.
We recently started a new series of posts called the Mobile Security App Shootout, which focuses on keeping our devices safe and recovering them if lost or stolen. Along those same lines comes an amazing Tasker/Locale plugin centered around the device security called Secure Settings.
Designed for Android 2.2+, Secure Settings offers a plethora of features for both rooted and non-rooted users, including quick keyguard toggle and lock, Linux run command, set or reset password/pin, device wake, or wireless ADB (root only).
If your Android device relies on your interaction with it in order to do things, you're seriously missing out. There are several options that allow you to cut the cord, so to speak. The popular options have long been Locale and Tasker but, as you can see from their market pages, you have to be fiscally dedicated to the tasks they perform. In addition to that, these applications (Tasker especially) can be somewhat (read extremely) intimidating in the level of control they give you and the sheer volume of options at your disposal.