One thing is quite clear:
A swarm is not a creature. So your spell, which targets a creature, targets one of the beasts in the swarm.
What happens next is also unclear. The easiest thing to do is to assume targeting part of a swarm is the same as targeting the whole swarm with an attack spell. The swarm makes a save, and on failure takes radiant damage. This, however, is never made explicitly clear in the rules of 5e.
It does not, in general, make sense to treat a swarm as a creature in all contexts. Treating targeting a part of the swarm as being able to damage the entire swarm results in a reasonable combat simulation 99 times out of 100; you just assume attacks "cleave" through one component of the swarm into others.
From sage advice:
Can conjure animals summon a swarm? No. Conjure animals summons individual creatures, and swarms are groups of creatures.
In addition, we have:
The introduction to the Monster Manual lists the variety of beings that count as creatures, organized by type
-- Jeremy Crawford (@JeremyECrawford)
"The variety of beings that count as creatures" in plain English means that the list is complete.
This list is titled "types", and is:
Aberrations, Beasts, Celestials, Constructs, Dragons, Elementals, Fey, Fiends, Giants, Humanoids, Monstrosities, Oozes, Plants and Undead
(with the description of each not included).
Swarm is not there. Swarm is explicitly stated as not a creature in Sage advice.
A swarm is not a creature, it is a monster composed of creatures.
Spells that target creatures cannot target the swarm as a whole without DM's permission. It must target a single creature within the swarm (which in this case are Beasts).
The effects of a creature within a swarm being targeted are not clear by the rules. So the effect could be marginal and/or determined by the DM. Or you could treat targeting a creature as part of a swarm similar to targeting part of a creature's body.
If you attack a creature's tentacles in D&D, barring a DM's ruling this simply attacks the creature's AC and deals damage to its HP. In this case, we have a monster that is not a creature, but is composed of creatures.
You could make a ruling that targeting a creature that is part of a swarm simply involves engaging with the entire swarm's game statistics.
This, however, is a ruling. You should not, in general, treat the entire swarm as a creature.
As an example, Wild Shape which lets you transform into a Beast (a kind of Creature) does not let you transform into a Swarm according to this tweet:
Wild Shape lets you transform into a single beast. A swarm is a collection of beasts, not one.
-- Jeremy Crawford (@JeremyECrawford)
The ruling, which seems to be intended, is that attacks in general "blow through" individual creatures and kill larger numbers of them, damaging the swarm as a whole. This both explains why a swarm cannot regain HP (as damage to it involves killing creatures, which mere healing cannot recover), and why it has resistance to certain damage types (which, presumably, don't "blow through" as well).
In this particular case we have a radiant spear of light. It would be reasonable to both have this spear blow through multiple creatures (and thus do non-trivial damage), or it could disrupt the dark magics that unify the swarm (and thus do non-trivial damage),
they form as a result of some sinister or unwholesome influence
-- MM pg 337
or it could just hit one beast and make it drop dead (and thus do trivial damage).
The same kind of call has to be made for every spell or effect that targets a creature; is it reasonable that when targeting an individual creature in a swarm that the effect "blows through" to the rest of the swarm or not.
Similarly, ruling should be made when area effect damage is applied to a swarm. A large-volume fireball hitting a swarm of ravens that deals more than 20 damage per creature would reasonably instant-kill the entire swarm, even though the swarm has more than 20 HP left, as the fireball by the rules deals 20 damage to each creature (beast) in the swarm.
Fireball text:
Each creature in a 20-foot radius Sphere centered on that point must make a Dexterity saving throw. A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one.
A Swarm is a collection of creatures, and Fireball targets each and every creature within its radius. By RAW, each creature in that swarm has to make a Dexterity saving throw, and take either full or half damage.
We could step back to a previous edition of the game, which would have been on the minds of the developers. In 4e D&D swarms were a kind of monster. They were vulnerable to area effect damage and took half damage from "single target" attacks. They were immune to forced movement from single target attacks, they can move through any opening large enough for the constituent beasts and they can occupy spaces of other creatures.
3 of these rules remain -- half damage from weapons (akin to the single target attack rule of 4e), squeezing rule, and overlapping spaces. The rest (that they are explicitly creatures, they take more damage from area attacks, and forced movement invulnerability) were stripped.
You could consider the stripping on purpose, or you can consider the stripping to be an example of simplifying rules and letting the DM make reasonable calls based off of the in-world fiction.