They do completely unrelated things.
Komachi is mostly a physical DPS character, and is in fact the only strong SPI-elemental physical attacker in the game. Yes, her HP is very high, but she's not a good tank because she requires a ton of babysitting from a healer to survive due to her terrible defenses (Minoriko is practically required for that job). Contrast with Meiling, Tenshi, or even tier 3 tanks like Keine, Sakuya, and Wriggle, who can go for a while without heals after some buffs. However, Komachi's ATK growth is also quite good, and Scythe that Chooses the Dead has a strong damage formula for its good delay. She's got a side use of debuffing DEF/MND/SPD with Narrow Confines of Avici, so she's got great utility as well, but her primary role should be to pump out lots of physical SPI damage.
Yukari is mainly a support character, as her most useful spells are her DEF/MND buff and Spiriting Away. Her PAR/SPD debuff spell isn't as strong as other options, so I usually just use it for random mobs. But her buffs are just as good as Reimu's (so very good, in other words), and Spiriting Away can be a game-changer. It takes work to make it good, and tends to be party-dependent, but when used to its best effect it can absolutely destroy many bosses.
The two work better in different party configurations. Komachi works best in teams that make good use of DPS-type characters with good delay who don't need to switch out, and uses SPD buffs a lot better than high-delay nukers. Yukari prefers to work with high-delay nukers, who allow her to maximize the effectiveness of Spiriting Away. Look at what your team has more of, and make your decision based on that.