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 system 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).
Update: Despite the plugin being called "Pidgin GNOME Keyring", it was ported from gnome-keyring to libsecret in February 2015.
Update: Despite the plugin being called "Pidgin GNOME Keyring", it was ported from gnome-keyring to libsecret in February 2015.
Install and configure Pidgin GNOME Keyring
Update: the Pidgin GNOME Keyring Plugin is now available in the official Ubuntu 15.10 and 16.04 repositories so to install it, simply use the following command:
sudo apt-get install pidgin-gnome-keyring
Ubuntu versions older than 15.10: to install Pidgin GNOME Keyring Plugin via its official PPA, use the following commands::
sudo add-apt-repository ppa:pidgin-gnome-keyring/ppa
sudo apt-get update
sudo apt-get install pidgin-gnome-keyring
Once the plugin has been installed, open Pidgin (if it was running, restart it) and enable the "Password Keyring" plugin under Tools > Plugins and then restart Pidgin:
Important note: to clear your old plain text passwords, click "Configure plugin" and check the "Clear plaintext passwords from memory" box.
If you're not using Ubuntu, you can get Pidgin Gnome Keyring plugin via GitHub.