Moonbow cuts foe’s defenses, whereas glimmer boosts your damage. As a general rule, moonbow works better the less damage you’d normally do, whereas glimmer does better. Units like ursula.or bladetomes that stack high amounts of atk tend to get more out of glimmer, though the difference isn’t huge
Using the ursula above, lets say she fights something with 37 res that has been hit by all 3 of her debuffs. She has 72atk on initiation and the foe has 30 res due to res smoke. No special means she does 42dmg. Moonbow reduces that 30 res by 9(30 × 30%), thus boosting her dmg to 51. Glimmer boosts her 42dmg by 21(42 × 50%), boosting her damage to 63. Now granted that foe was clearly dead no matter what, but the principle holds true.
Tl;dr: I believe the math works out to roughly “if foe’s def/res is >/= 60% of unit’s atk, glimmer does more damage. If foe’s def/res is >60% of unit’s atk, moonbow does more damage”. So unit’s like ursula, bladetomes, and broadleaf fans get more benefit from glimmer due to how high they stack their atk