I'm not sure what the cause is, but I never had this issue until I installed Mountain Lion. I had the iMessage Beta prior to installing Mountain Lion and I did not uninstall it after. However, I get disconnected constantly and its been going on and off. I have a lot of difficulty connecting to AIM, but GTalk is disconnecting frequently. I am not sure where to start.
I have been having this pesky problem as well. Mine was solved by reseting the password with the provider.
I found a post that stated that someone solved this by logging into AIM.com website and reseting their password. I tried this and found that since my AIM account was set up through another provider (Apple) that I needed to go to Apple and change my password. I did this and it resolved my issue. (I needed to change the Apple password anyway for good security in that I had not changed it in YEARS).