Beorn might have learned some tricks from Radagast the Brown. In a letter, Tolkien described Beorn as "a bit of a magician" although he was a mortal Man.
I do think he could talk to all the animals. I don't know where he learned it though.
Probably the same place he learned how to violate the conservation of mass and turn into a bear.
Didn't he state he knew Radagast? He may have learned a few tricks from the Brown Wizard. Then again, maybe it was a family secret.