In 3.5, swarms were vulnerable to such effects because of the following rule:

Vulnerabilities Of Swarms

Swarms are extremely difficult to fight with physical attacks. However, they have a few special vulnerabilities, as follows:

A lit torch swung as an improvised weapon deals 1d3 points of fire damage per hit.

A weapon with a special ability such as flaming or frost deals its full energy damage with each hit, even if the weapon’s normal damage can’t affect the swarm.

The extra damage dealt by such abilities is still weapon damage, albeit of an unusual type, and so swarms would be immune to it without such a rule.

Pathfinder made several changes to how swarms work, but still includes an immunity to weapon damage for many swarms. However, they have removed the section regarding energy weapons and extra-effective torches, which renders such weapons incapable of affecting swarms in that system. Furthermore, Pathfinder has introduced many more area of effect weapons (rocket launchers, shotguns, flamethrowers, etc) than 3.5, highlighting the fact that such weapons do not work against swarms as effectively they do against massive groups of non-swarm targets.

Technically, bonus elemental weapon damage is still weapon damage, and so such enchantments are ineffective. However, as reverting the situation to the 3.5 era rules merely slightly decreases the widened gap between weapon and spell based classes while simultaneously lessening the widened gap between swarms and other monsters of their CR, such a reversion is very unlikely to cause problems as a house rule.