In most of cases, it's slightly better to preserve your bishop.
When Do I Capture?

Generally, you need to weigh what you gain against what you lose.
What do you lose:
The bishop pair.
Trade off a developed piece.
What do you gain:
Better pawn structure.
This is just a very general, and basic undersyanding, and much will dependin on the position.

Common pros of capturing:
- Double their pawns
- Weaken a central square or pawn the knight was protecting
Cons of capturing
- Lose the bishop pair
- May make you weak on one color complex
Pros of retreating to the edge:
- Force them to extend their pawns to chase you away
- Force them to break the pin with a piece
- May prevent their queen from moving to where she wants to go
- If they choose not to do any of these, then you have extra time to build your pressure.
Cons of retreating to the edge:
- Often greatly reduces the bishop's choices (it usually can't get back to the center or the other side)
- May get chased with another pawn push to land on a blocked or inactive diagonal.
Pros of retreating to the center
- Maintain control of central squares
- Maintain sacrificial options against the rook pawn that chased you away
- Usually more mobile in general
Cons of retreating to center
- Sometimes gets in the way of other pieces, for example it will block whatever file you put it on.
- You've likely spent 2 moves to place it where it could have gone in 1. So if it hasn't caused a concession from the opponent, you may have simply lost time.
When faced with the classic pin of a knight on c3, c6, f3, or f6 pinned to the king or queen with a bishop, how do I decide whether or not to capture? I know there isn't an absolute answer, I just want to make sure I consider the right things.
Edit: I mean capture the knight with the bishop, especially if faced with a pawn pushed on a2, a7, h2, or h7 to threaten the bishop