This Travel SE question's accepted answer raises that there's a Federal Regulation in the US, namely 49 CFR § 392.10 - Railroad grade crossings; stopping required, that requires buses that transport passengers to stop at railway crossings whether a train is coming or not.
Cornel's website has a few links to amendments. Language related to this seems to be present in the 1970 and 1973 amendments. The Federal Register link for 1968 is broken but the Library of Congress has a 392.10 reference titled "Railroad grade crossings; stop-ping required" that from a cursory read suggests it was around then. More specifically, a note on page 19700 (thanks Nate Eldredge!) suggests that the paragraph 292 became 392 in 1968, and that the regulation was introduced even earlier. The Federal Register, unfortunately, doesn't allow to search for docs from earlier than 1994, so my search to locate the earlier text was fruitless.
There were a few major train accidents in the past with some of them related to the US. Cursory search yields e.g. Prestonburg, Kentucky, in 1958; Greely, Colorado, in 1961; or Spring City, Tennessee, 1955; among other crashes. There's always the possibility, of course, that the regulation simply was some official who thought it was a good idea and threw it in in passing, but this seems weirdly too specific so I would imagine some school bus related train crash or something equally awful occurred a few weeks or months before the regulation got introduced.
When was this introduced exactly, and what was the backstory that led to this regulation?