By default, Pidgin saves all your passwords in plain text (look under ~/.purple/accounts.xml). About four years ago there was a bug report that asked to encrypt the passwords, but the developers marked the bug as "wontfix". Update: you can read about the reasons behind this, here.
Here's where Pidgin Gnome Keyring plugin comes in: this plugin will make Pidgin store your passwords in the Gnome Keyring. One note though: the plugin will not prevent other plugins from writing passwords in the accounts.xml file (I don't use any such plugins so I can't give you an example).
1. To add the PPA and install the Pidgin GNOME Keyring plugin (for Ubuntu 12.04, 11.10, 11.04 and 10.04, use the commands below:
sudo add-apt-repository ppa:pidgin-gnome-keyring/ppa sudo apt-get update sudo apt-get install pidgin-gnome-keyring
2. Once the plugin has been installed, open Pidgin (if it was running, restart it) and enable the "Gnome Keyring" plugin under Tools > Plugins and then restart Pidgin:
Important note: sometimes the passwords are still saved in plain text the first time you start Pidgin (after enabling the plugin) - if this happens, restart Pidgin. To see if the Pidgin Gnome Keyring plugin is actually working you can look under ~/.purple/accounts.xml and see if your passwords still show up in plain text - they shouldn't. Hopefully this will be fixed in the future.
If you're not using Ubuntu, you can get Pidgin Gnome Keyring plugin via Google Code.