Under Federal Railroad Administration guidelines, train engineers must sound their horns as they approach crossing areas to warn pedestrians and vehicle traffic.
A local government has the option of silencing trains under federal law, but only if the local government agrees to certain conditions set down in “quiet zone” regulations. The public entity would need to pay for railroad crossing improvements in order to stop the horn sounds. It would also be responsible for extra liability cost insurance expenses. (The specific conditions should be worked out with the railroad, but, if the railroad is unreasonable, the final arbiter is the FRA Associate Administrator.)
See http://www.fra.dot.gov/us/content/1318 and http://www.fra.dot.gov/us/content/1475 for details.