The first and most important thing: negating and countering/dispelling are separate. They don’t both happen from the same casting of the spell.
Negating is what happens when you cast celestial brilliance normally—it creates light in the area, except for the parts of the area that overlap with magical darkness. In those spots, instead of creating light, it negates the magical darkness (just as the magical darkness negates its light).
Applies to everyone equally
Celestial brilliance does what it does equally to everyone. There is nothing in the spell that allows the caster to limit its effect on allies. Anything it does to enemies, it does to allies too (and to the cleric themselves!). Likewise, anything it doesn’t do to allies, it also doesn’t do to enemies.
That includes the negating
So yes, celestial brilliance negates magical darkness, both from allies and enemies. But this is only “darkness,” not all dark or shadow-based magic. You are looking for the “[Darkness]” descriptor in the spell description, after the school. For example, deeper darkness has “Evocation [Darkness]” on the second line—that is what celestial brilliance interferes with.
If something has “[Darkness]” then celestial brilliance negates it in the area where they overlap. If something has something to do with darkness or shadow or whatever, but doesn’t have “[Darkness],” then it works fine in celestial brilliance.
Shadow spells and darkness spells are separate
“Shadow spells” are those that have “Illusion (Shadow).”
“Darkness spells” are those that have “[Darkness].”
The two aren’t the same! Shadow evocation is a shadow spell, but not a darkness spell. Deeper darkness is a darkness spell, but not a shadow spell. And celestial brilliance only negates darkness spells, not shadow spells.
So if the cleric’s wizard ally casts deeper darkness, the cleric’s celestial brilliance negates it where they overlap. The same for a shadowcaster’s black candle mystery used to create darkness (Tome of Magic pg. 142). And if an enemy babau demon casts darkness, celestial brilliance negates that too.
However, if the wizard casts shadow evocation, celestial radiance doesn’t do anything to it. And likewise for enemy wizards, they can also use shadow evocation within celestial brilliance with zero problems.
Finally, despite the name, shadow magic isn’t always technically in the “(Shadow)” subschool. Celestial brilliance doesn’t do anything to shadow spells in the first place, but if something does, it only works on the mysteries that actually have the “Illusion (Shadow)” school, like ephemeral image (Tome of Magic pg. 145).
And shadow mysteries like bolster—which is just “Transmutation,” no “(Shadow)” or “[Darkness]”—are not affected by anything that interferes with shadow spells or darkness spells, because it isn’t a shadow spell or darkness spell—it’s just a Transmutation.
Countering and dispelling
Countering or dispelling are alternate uses of the spell—instead of casting celestial brilliance, you can use the prepared celestial brilliance spell to counter or negate a [Darkness] spell of lower level. If you do this, you don’t get the usual effect of celestial brilliance—no light—and instead just eliminate the [Darkness] spell of whatever you countered or dispelled. Countering and dispelling are targeted effects, so you can (and probably would) choose to use them only on enemies.