Although not specifically intended to identify photographs, several books about American military uniforms, headgear, and insignia are sufficiently detailed to be useful for that purpose. They are all either in the adult circulating or the reference collections, generally under the class number 355.14 (or R 355.14, in the case of reference). They can also be located in the catalog by using the subject headings: United States. Army--uniforms, or United States. Navy--uniforms.
Many old photographs were printed on card stock that had postcard backs and could be mailed. These can often be dated by the format on the back, notably by the stamp box. The following link leads to a website with useful information about them: How to Identify and Date Real Photo Vintage Postcards.