Lots of people (including me) have been experiencing issues trying to connect to their yahoo messenger account via pidgin. The reason for this issues seem to be that Yahoo are updating their servers and are using a new authentication system?
Thankfully i found a workaround
Open Pidgin and go to Account menu
select manage account, choose your yahoo account and click on modify
go to the advance tab. and in the page server field replace whatever is there with the following
save and close.
Try connecting to yahoo again from pidgin. It sure worked for me. I hope it works for you