It's random. For a while, I thought there was some kind of preference for buffing a girl right next to the one with that effect, but after a few tests, this turned out to be a wrong assumption as well. If there is a preference, then the "preference effect" is very small, so I doubt it's even there.
Which effectively made me remove such girls from my units and replaced most of them with those who buff the entire team instead, even if the latter usually do with a slightly lower boost. Just because it's a rather unreliable buff.
It's a great effect when the "right" girl gets the buff, but mediocre if the receiver has low stats (10% of little still ain't much) or doesn't trigger any special attacks. And I'm a bit of a condom-player.