There are times when your windows phone 7 might be away from your and could be another hands at that time you may not want others to see or view any of your private data or info inside the phone.
1. From Start, flick left to the Applications list and then press Settings.
2. In Settings, press Lock & wallpaper.
3. Do one of the following
3.1 To set up a password for the first time, turn on Password, enter your new password in the New password text box and then re-enter it in the Confirm password text box
3.2 If your phone already has a password and you want to change it, press Change password and then enter your phone’s current password in the Current password text box before entering your new password.
4. Press Done to save your changes.