Consider a move where a bishop takes a pawn and gives check but without any defense, so the King can take the bishop. In many openings there is a opportunity in the first moves to do so. Can this give an advantage to the sacrificing player?
As mentioned in a comment, sacrificing a bishop for a pawn is a completely different thing than sacrificing two pawns, even when they have equal "pawn values".
Most importantly: If you sacrifice material to prevent the opponent's king from castling, your objective is to lure him out into the open and checkmate him as soon as possible (before your opponent has the chance to coordinate his now numerically superior forces). Giving two pawns for this purpose might or might not be worth it (greatly depends on the specific situation) - their absence might open additional lines for your pieces to attack the opponent's king, so their loss might actually turn out to help you. Sacrificing a bishop on the other hand counteracts your chances to deliver a quick mate: You weakened the squares around the king, but you also weakened your ability to attack these squares. Again, it all depends on the situation. If you can force a mate anyway with, say, your queen and a knight, it's all good. But then the question should be a different one.
- Is it worth to sacrifice a bishop for a concrete mating attack? Hell yeah!
- Is it worth to sacrifice a bishop just to prevent the opponent from castling, without a concrete mating combination? Most likely not.