Usually trading a bishop for a knight is not good but there are some exceptions like if the pawn structure of your opponent gets bad and you know a way to take advantage of that