In Star Trek Beyond, the Enterprise crew aboard the USS Franklin discerns by way of Spock and Bone's espionage the exact UHF frequency to play Beastie Boy's Sabotage for to disrupt the drone cooperation. When Starbase Yorktown joins the party, drones by the screen-full burst into spectacular fireballs. I understand that without their hive mind they would no longer fly in formation, but what causes them to freaking blow up? Did I miss some dialog?
Having watched (and rewatched) this scene, I'm really no wiser as to why the ships started exploding, other than that the radio signal somehow causes it. The explanation given on screen is no real help.
Spock: From what I can ascertain, the ships share a cyberpathic link that coordinates their actions. Patching it through now.
Uhura: That's what that signal was. They weren't jamming us, they were talking to each other
Kirk: Well, how do we get them to stop talking?
Scott: What about ah, electromagnetic focusing? We could use the transporters to disrupt their network
Spock: The focus might be too specific. If we can find some sort of disruptive communication signal inside the swarm, it might inversely affect their capacity to coordinate.
Chekov: It would have to be at a frequency that they will not anticipate.
Sulu: It could cause a chain reaction that would wipe out the whole swarm.
Scott: Sir, a closed network like that might be susceptible to Very High Frequency.
Kirk: VHF. [beat] Radio! We can broadcast something from the ship to drown out the links. Loud and distracting.
Scott: Loud and distracting? I've got just the thing.
They are not spontaneously exploding
The drones are attacking as an overwhelming, densely-packed precisely synchronized swarm, performing intricate and coordinated maneuvers, en masse, in perfect harmony, at very high velocity.
As soon as that perfect coordination is disrupted they are going to start bumping and colliding with each other. Packed as tight as they are, moving as fast as they are, that's going to create a chain reaction of collisions.
EDIT: It is also possible that the close proximity to an exploding ship might cause another ship that close to explode, as well, and any combination of those two events throughout the swarm, but the specific quote provided by Valorum in his answer, where Spock references the disruption of coordination, suggests that collisions would be the main mechanism.
Maybe they were flying a little too sideways when they got jammed
It didn't seem as though the drones tended to travel along a linear trajectory. Therefore, it seems reasonable to assume that they flew sideways into one another.
I've only seen the movie once, so I don't remember if they just suddenly exploded (which would make my answer worthless).