As someone who knows nothing about baseball, this sounds interesting but I think it could do with more explanation.
Are they used for communicating with the batter?
Correct; the player would wear a receiver somewhere on their body which was used to relay what pitch was upcoming. The Astros got caught banging a trashcan, but my high school English teacher (who published several books on baseball as a huge fan of the sport) used to say that baseball is a sport to see who can cheat the most without getting caught. From what I can tell, the league doesn’t look too hard for it either.