As for Yuyuko's power it's actually much more intimidating when we hear about it, than after we realize that in Gensokyo there are many beings that can be considered immune to her power. Her ability is taht she invokes death in a person by inviting the soul residing inside the body to leave it and go to the Netherworld. Kaguya and Mokou have their concepts of death absolutely erased from existence due to effects of Hourai Elixir so they can't die. Remilia and Flandre are already somewhat "dead" (undead), although we do not know if this counts as having a soul or not. Gods probably would also be unable to die, as they're you know, gods, it can't be possibly so easy. I am not quite sure about youkai - if we can count them as having souls or is soul a concept native only to humans in Gensokyo. And what about celestial beings like Tenshi, shinigami like Komachi, jiang shi as Yoshika, hermits and of course Youmu, a half-ghost? I rather like to think that Yuyuko's power works only on humans, and not on inhuman beings - that would kinda justify why Yuyuko killed herself instead of using her power to eliminate any threats against fellow humans that came from the youkai of Gensokyo.
We don't know if vampires from this universe are actually undead, so we can't say that Remilia and Flandre would be immune based on that.
Youkai most likely do have souls, considering that Shikieiki goes around lecturing them too. If they didn't have souls, they wouldn't be judged by her, and therefore she wouldn't bother them considering that they would never go to hell or heaven anyway. Also, she says to Cirno, after discussing how she's causing too much trouble and may not be able to return to nature: "In other words, that means death. If you die, then we will most definitely judge you. At that time, whether you will go to heaven or hell... Well, we don't know that yet".
Although being a god doesn't necessarily mean much in Gensokyo (Shizuka and Minoriko aren't that great), I also don't think her power works on them, considering they're basically made of faith and are mostly spiritual beings anyway. And since shinigami are death gods I suppose they wouldn't be affected either.
Celestials and Hermits can die (kishins go hunt for them after all), so they should be affected by her ability. Yoshika is already a soulless husk, according to SoPM, so she probably wouldn't be affected. Youmu is half dead, not fully dead. Her soul is probably not the large phantom thing; that is said to be a part of her body in her IN profile and in PMiSS. And anyway, half-phantoms are said to have a longer life span compared to humans, but are still implied to be mortals, so she most certainly can be affected by Yuyuko's ability.
Yuyuko died way before the creation of the Hakurei Barrier, so she wouldn't use her power to protect humans from there. 'Sides, she was friends with a youkai (Yukari), so I don't think she'd go around killing them.
She killed herself because she was afraid of her own power. Imagine being able to kill anything with just a thought, regardless of what it is. Any burst of anger and there, you killed someone.. She probably was too much of a nice person in life, and her power burdened her to the point where suicide was the only way to guarantee she wouldn't hurt anyone.
Well, it's how I like to interpret it anyway.
Actually, at one point I really believed that Yuyuko's power is similar to that Tohno/Nanaya guy from Tsukihime. They can kill anything as long as it's able to die. Maybe her power affects the victim's concept of death rather than their soul?
I think Flandre's power is more similar to the Eyes of Death Perception that Shiki Ryougi/Shiki Tohno have. The difference being that she can make the "death lines" appear on her hand, instead of having to hit them in the target.
The problem I have with equating Yuyuko's power with theirs like that is that her power is specifically stated to have grown from "ability to manipulate departed souls" to "ability to invite others to death" in her profile...