From the NY Times:
Q. Why are some city fire hydrants yellow? The only places I recall seeing them are in parts of Queens.
A. You may be referring to some “legacy hydrants” the city inherited from the former Jamaica Water Supply Company system, suggested Michael Saucier, a spokesman for the city’s Department of Environmental Protection. In 1996, the city took over the company, the city’s last privately owned supplier.