Never heard of such a hard and fast rule. There are very few rules that hold true every time. Sometimes a rule will apply to a specific opening or two, but not broadly. As always, most rules 'depend on the position'. If there's not a clear reason given for such an explanation that makes sense, I'd treat the advice with a pinch of salt.
You can pin a Knight with your Bishop before or after the opponent has castled. All throughout the game you should be checking to see if the move is safe to play, and/or if playing such a move makes your own position better or worse. If it's worth it, go for it. If you can exploit the pin, and build up pressure on that piece with more attackers, even better!
Do not pin a KN with your QB before the opponent has castled O-O


No clue. I pin my opponent's King Knight with my Queen Bishop all the time in the Torre Attack and in the Queen's Gambit Declined so I reckon this doesn't apply to d4 positions

This rule is bad... it has more to do with the bishop eyeing the f7/f2 square than it has to do with castling.
This rule stems from Lasker and Steinitz. It makes a lot of sense, though there are exceptions.
There are two reasons for this rule.
1) Say black has played ...Nf6, has not yet played ...O-O and you play Bg5. Now black plays ...h6. The bishop is worth more than the knight, so Bxf6 is good for black. On the retreat Bh4 black can follow up ...g5 and then prepare O-O-O.
2) You expose yourself to tactics. A few examples:
1 d4 d5 2 c4 e6 3 Nc3 Nf6 4 Bg5 Nbd7 5 cxd5 exd5 6 Nxd5? Nxd5 7 Bxd8 Bb4+
1 e4 c6 2 d4 d5 3 Nc3 dxe4 4 Nxe4 Nd7 5 Nf3 Ngf6 5 Nxf6 Nxf6 6 Bc4 Bg4? 7 Bxf7+
1 e4 e5 2 Nf3 Nc6 3 Bc4 d6 3 d4 h6 4 Nc3 Bg4? 5 dxe5 Nxe5 6 Nxe5 Bxd1 7 Bxf7+ Ke7 8 Nd5#
#8
Lasker had it from Steinitz. Steinitz automatically gave the pin a question mark. Steinitz and Lasker presented the rule as universal, i.e. not linked to open games only. Of course there are exceptions just like there are exceptions to the other 3 rules. The Canal Variation hardly sees play nowadays: top grandmasters prefer 5 c3 controlling d4 and leaving Bc1 and even Nb1 where they are.
in the slow Italian it's a typical mistake to do this because Black can Play h6 and g5, solving the pin, gaining space and starting an attack on your king pointing out he can always castle queenside. There is another version of this small nuance that says you shouldn't castle and play h3 before Black castles short because then h6 and g5 is going to come but there are obviously exceptions

I saw this advice in a post below, so what is the strategy in the statement? There must be exceptions. Is it just because you can be chased back, and wasting time not developing? Does it open you up to various traps? Any thoughts?
I have only heard of this rule in one opening. The Slow Italian. In the slow Italian, both the Bg5 pin and the h3-push should be avoided until Black castles. It has to do with Black's ability to SAFELY play ...h6 and ...g5. Yes, there are lines where Black does that after castling, like 1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 4.O-O Nf6 5.d3 O-O 6.Bg5 h6 7.Bh4 g5 8.Bg3, but here, Black has to worry about the airy King.
With the King not castled, it is still on e8 and can go to c8 via castling Queenside, and play a kingside pawn storm.
This pawn storm is a lot less attractive if Black has castled Kingside already.
The Bg5 move gives Black the moves with tempo. The h3-push gives Black a hook, which again, advancing is far less attractive for Black if the King is already on g8.
Outside of the Slow Italian, I have never heard of any such rule. For example, one of the main lines of the Queen's Gambit Declined is 1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5. Black has not castled yet.
#12
Lasker wrote this as rule 4 of his 4 rules in "Common Sense in Chess". As said he has it from Steinitz. All 4 rules have exceptions, but if you follow his 4 rules, then you play sound chess.
Lasker warned beginners against 4 Bg5. White exposes himself to all kinds of tactics. There are unpinning combinations with ...Nxe4 and ...Nxc3, there are combinations with ...c6, ...dxc4, ...Qa5+ and ...Qxg5, with ...c5, ...cxd4, ...Qa5+, ...Qxg5. It is much safer to avoid all that risk.

#12
Lasker wrote this as rule 4 of his 4 rules in "Common Sense in Chess". As said he has it from Steinitz. All 4 rules have exceptions, but if you follow his 4 rules, then you play sound chess.
Lasker warned beginners against 4 Bg5. White exposes himself to all kinds of tactics. There are unpinning combinations with ...Nxe4 and ...Nxc3, there are combinations with ...c6, ...dxc4, ...Qa5+ and ...Qxg5, with ...c5, ...cxd4, ...Qa5+, ...Qxg5. It is much safer to avoid all that risk.
While Lasker was a strong player, the advice from 100 years ago is not the same as today. A lot has been learned since then. The reason that they advise low rated players to study the games of older players is that they worked off generalities, not specifics. The problem is that generalities are HIGHLY FLAWED. This holds true regardless of what comparison you are making. Even material. Often times, a Knight or Bishop is better than a Rook in specific positions.
Many generalize that you should or should not do something simply because of a bad experience. For example, just because you fall for something utterly stupid, like 1.d4 Nf6 2.Bg5 c6 3.e3?? Qa5+, winning the Bishop, does not make the Trompowsky unsound.
Just because you fall for another stupid trap like 1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5 Nbd7 5.cxd5 exd5 6.Nxd5?? Nxd5 7.Bxd8 Bb4+, with Black winning a piece, does not make the Queen's Gambit with 4.Bg5 unsound.
So your argument really is invalid. What you are saying is, let's avoid the best move because there are some additional traps that must be avoided. Why not avoid the trap and play the right follow-up moves to Bg5?
Alos, generalities must be taken with a grain of salt in today's day and age of chess. White having a Rook for Bishop and Pawn does not mean White is better, despite the "5 for 4" assessment. Black having a Bishop and White a Knight in a closed position does not automatically mean White is better, despite the generality that Bishops prefer open positions. Just because White's King got to the 4th rank and Black's only the 3rd in an endgame does not make White's position better - he could have a weaker pawn structure, for example.
#13
The Lasker and Steinitz principles are still valid in general. The rules of the game have not changed. The principles have exceptions, but provide sound guidance for beginners.
A strong player can calculate all unpinning tactics, but a beginner cannot. So a beginner is better off not to pin 4 Bg5 and play say 4 Bf4 or 4 Nf3 or 4 e3 which is safe and sound.
Same with the other principles.
'Play knights before you play bishops' is sound advice, though Carlsen has played 2 Bg5, 2 Bf4, and 2 Bc4.
'Do not play the same piece twice' is sound advice, though Carlsen and Caruana hopped around with their king's knights in their 1st World Championship game.
'Play only d- and e-pawns' is sound advice, though many grandmasters play other pawns.
How can you offer this as a 'general' rule for beginners to follow then, if it only really applies in certain scenarios.
I trend around 1800-1900 blitz (which is my no means high) but I have never heard of this rule, so it can't be up there with being as much of a rule as opening in the centre, develop your minor pieces as soon as possible, etc - for beginners to abide by.
I've also never played the Italian opening, maybe that's why.
I saw this advice in a post below, so what is the strategy in the statement? There must be exceptions. Is it just because you can be chased back, and wasting time not developing? Does it open you up to various traps? Any thoughts?