Two enemy pieces on the same diagonal call for consideration of a skewer by your bishop or queen. White saw Black’s rook and knight so aligned here, and then played Bd2; now Black faces a skewer and the threat that he will lose the exchange (or, if the rook moves, that he will lose his knight). Black’s only interposition—Qf4—is worse than useless. He has a check in Rxg2, but it loses the rook for a pawn and so defeats the purpose of breaking out of the skewer. What remains? A mate threat, of course. Black’s queen attacks h2, adjacent to White’s king. If he had further support for an attack against that square, he could threaten mate. Can either of the Black pieces in the skewer leave their squares with an attack against h2? Yes: Black can play Ng4. Now White has to worry that Black will play Qxh2+—and then, after the reply Kf1, Qh1#. After White takes defensive measures to prevent this (e.g., f2-f4), Black has time to move his rook. White’s threat is extinguished.
Notice that Black had another option as well: moving the middle piece—his rook—not with check but with a threat against White’s queen via Re5. The rook would have protection from the pawn on f6. Since the threat Black creates with this is larger than the gain White could obtain from following through with BxN, he has to abandon the skewer in favor of a retreating move with his queen like Qd1. There is, however, a kicker: Black needs to spend his next move protecting or relocating his knight (it is about to get taken for free otherwise). After that, White can pin Black's rook to its queen with Bf4.