It does not
Bard's Inspire Courage only works on weapons, meaning that anything that isn't considered a weapon will not get this bonus.
For instance, it will work on a magical ray spell, as those are considered weapons (see this FAQ). Or even weapon-like spells, such as Spiritual Weapon or Flame Blade. But it will not work to increase the damage of Magic Missiles or a Fireball, for instance.
This means that the swarm automatic damage wouldn't benefit just like a Fireball also wouldn't, as there is no attack roll involved, and there is no weapon in the ability's description. On the contrary, it is described that the Swarm attack replaces the normal attacks, and this attack is not described as a weapon attack at all. From the Swarm subtype:
Swarm Attack: creatures with the swarm subtype don’t make standard melee attacks. Instead, they deal automatic damage to any creature whose space they occupy at the end of their move, with no attack roll needed. Swarm attacks are not subject to a miss chance for concealment or cover. A swarm’s stat block has “swarm” in the Melee entries, with no attack bonus given.
On top of that, Inspire Courage is described as a Mind-affecting ability, which will rule out nearly all vermin-swarms right away. But mind-affecting effects that have no number of targets could affect a swarm, as they are only immune if the effect hits a specific number of targets:
A swarm is immune to any spell or effect that targets a specific number of creatures (including single-target spells such as disintegrate), with the exception of mind-affecting effects (charms, compulsions, morale effects, patterns, and phantasms) if the swarm has an Intelligence score and a hive mind.
This means that, even if the swarm wouldn't gain the bonus to weapon attacks and damage rolls, they could still benefit from the saving throw bonus against fear effects, if the conditions above are met.
Since nearly all published hive minds are also vermin or have no Intelligence score, or simply have immunity to mind-affecting effects, that also rules them out. There are two exceptions, though, the Bettle Swarm Hivemind (Occult Bestiary), and the Hivemind Swarm (Bestiary 6).
Regardless, none of them are actually described as able to make weapon attack/damage rolls, as such, there is nothing for Inspire Courage to enhance there.