My druid wants to start summoning swarms for the rogue to use as a flanking buddy. Would this work?
No, a swarm does not threaten creatures, even those it is covering, and so does not cause flanking.
Swarms do not threaten creatures in their square, and do not make attacks of opportunity with their swarm attack. However, they distract foes whose squares they occupy, as described below.
When making a melee attack, you get a +2 flanking bonus if your opponent is threatened by a character or creature friendly to you on the opponent’s opposite border or opposite corner.
No threatening, no flanking.
That said, note this is due to it being a swarm, not because it is summoned. All swarms cannot flank, and non-swarm summons can (generally; other creatures may also have exceptions like swarms do).
Finally, considering that summon swarm does not give the caster fine control over the swarm, it was probably a poor idea anyway. Summon nature’s ally is all around far better for flanking, and giving allies a flanking buddy is one of the best uses of summoning.