We might conclude that the rule came into common practice some five centuries ago, roughly during the period when the queen acquired her powers. Our current rules regarding castling were still in flux in the late fifteenth century, and even in the sixteenth, so the en passant capture is not the newest rule change. Nevertheless, it remains the most difficult one for beginners to grasp.
I had a rare opportunity to execute an en passant capture yesterday. After two days of play and 24 moves, my opponent and I reached this position with him on move.
White to move
He played 25.c4, advancing a pawn two squares. The pawn passed over a square where it might have been captured by my d-pawn if it had moved one square.
Black to move
The green arrow shows the path taken by the white pawn. The yellow arrow indicates the path the black pawn will take in order to capture en passant (in passing).
I played 25...dxc3.
White to move
After the en passant capture, the pawn on c4 has disappeared from the board. My pawn sits on c3. The tactical point of my capture was that now my rook is attacking the white queen: an en passant capture that creates a discovered attack. How often does something like that come up?
*A complete English translation and detailed analysis of Libros de Acedrez is available in the 2007 dissertation "Los libros de acedrex dados e tablas: Historical, Artistic and Metaphysical Dimensions of Alfonso X’s Book of Games" by Sonja Musser Golladay.