Hat cords were designed for wear on Campaign Hats, which were first introduced in 1872 and were authorized for Officers, Warrant Officers, and Enlisted personnel through the end of World War II. (Nota bene: Many Army uniform manuals also refer to them as “Service Hats.”) In 1917, the War Department mandated in a Special Regulation that Hat Cords were “to be the color of the facings of the arm of service as issued,” and earlier that same year it had specified black as the color of Chaplains—no surprise, since that color had long been associated with the chaplaincy.
But it turns out that black hat cords were not always linked to Soldiers serving in the Chaplain Corps (as Officers, actual Chaplains would have had cords of intertwined black and gold with gold acorns). According to The Encyclopedia of United States Army Insignia and Uniforms by William Emerson, black hat cords were worn by members of the Signal Corps between 1899 and 1902, and from 1917 to 1920 they were designated for “Support organizations.” In the same book, Emerson goes on to write that unofficial black hat cords were also worn by members of the “Red Cross, Library Service, and similar organizations” during World War I, but it’s unclear if these are the Support organizations he mentioned earlier.