Although this has been explained before, MTV Movies Blog has posted an exclusive short story from Transformers: Exodus author, Alex Irvine, that provides the story regarding how Bumblebee lost his voice.
“You could die here, but the last thing your pitiful librarian leader needs is another martyr,” Megatron said. “You live as a reminder that I can kill when I please, and grant mercy when I please. But there is a cost. And for you, the cost is that voice of yours that you love so much.”