You may be aware of the iPhone backup feature within iTunes (on your personal computer), and you may have seen the checkbox to encrypt the backup. What you may not know is that the backup will only contain passwords you've stored on your iPhone if you've enabled backup encryption.
It is quite simple to enable encryption. Make sure that your iPhone is connected to your computer with the USB cable, wait for iTunes to sync. In iTunes, locate and click on your iPhone on the left-hand side (under 'Devices', and scroll down in the main pane to the 'Options' part. Tick the 'Encrypt iPhone backup' box and you will be asked to set (and confirm) a password - not necessarily the same as your iTunes password, but it can be the same if you like.
Bear in mind that this option persists across any iTunes application that you sync your iPhone with - ie, if you sync your iPhone on multiple computers. Once you've set the backup password once, all iTunes installations need to honour it.