I am not sure there is any general, abstract rule. but you can be sensitive so several things:
taking with the bishop implies:
1. suppressing the white knight and
1 bis. very usually, losing your black bishop.
and usually,
2. gaining one tempo for black.
3. moving the white queen to f3, except if white takes back with the pawn
4. free white queen (because it does not have to protect the knight anymore).
Then it is interesting to suppress white knight, usually :
due to (1),
- to put pressure on specific squares of the center the knight was defending.
- more generally, if you consider that the knight will be better (for instance, in a closed game).
- due to (1bis), to get rid of a bad bishop.
Knowing that bishop are a bit more interesting, in general, there must be a reason to do so. this can be the case, if the bishop has no good square to be. more precisely, when black have a fancietto structure h7-g6-f7, to avoid the bishop from being trapped. (after g4).
- due to (2) to gain one tempo.
- due to (3) to bring the queen on f3 where it might be bad. for instance if white's plan is to push f4, bringing his queen on f3 will make him lose another tempo. or if you can threaten the queen on f3 (by developing a knight on a good square around, for instance.) gaining tempi again.
on the contrary, it might be bad to do so when you see that the white queen would not otherwise be able to move from d1 (or e2), without being exposed to BxN g2xN which destroys white king's defense.
(and this is true only if opening the g file for white, is not a problem for black.).
other possibilities for black after h3 are:
- moving the bishop back on h5, which keeps the pin. the obvious threat is then g4; but in most situations, that just weakens white's defense.
- or moving the bishop somewhere on the h3 c8 diagonal. this might be interesting, if you want to put pressure on h3, for instance preparing a sacrifice of the bishop on it, after having put the queen on the same diagonal. But this re-orients your strategy from the center (when you pin the knight protecting the center) to the king side.
So I would say, more generally, that it depends on about three things: the respective values of knights and bishops; the tempi you can gain or lose; and the strategic orientation of the game on one side of the board.