There are changes for which unions claim credit, but that really started to change before unions became involved. Two issues I'll quickly address in this blog entry are civil service protections and early workplace safety.
Many of the benefits attributed to unions were actually a result of the "Civil Service" reforms before the 20th Century meant to end the patronage systems nationally and in New York. In NYC, things were so bad the state took over Civil Service rules from 1870 to 1900. Unions helped push many reforms, definitely, especially in terms of safety, but not as many as commonly thought.
Disgusted by the "spoils go to the victors" approach of the Andrew Jackson Democrats, Republican President Chester A. Arthur pushed for the Pendleton Act. The public, outraged by the "Spoils System" of patronage, helped push President Arthur, once a supporter of patronage, to embrace public employee reforms. The Pendleton Act become law on January 16, 1883.
By 1896, most federal posts in the United States were under what became known as the Civil Service reforms. Federal patronage was eliminated before the rise of most unions, unlike state and local government patronage.
So it was not unions that pushed reforms to protect government employees from politically-based firings (or hirings), but a Republican Party dedicated to reforms based on merit and seniority rather than affiliation.
The elimination of patronage affected private industry as well, because the largest industries were regulated by federal contracts. People often forget that railroads, shipping, mining, and other industries played a major role in the Civil War. Because of this war connection, federal regulators stepped in frequently because they needed high-quality projects.
The State of New York had its own problems, as symbolized by Tammany Hall.
Private industry, however, was far from ideal. Unions did rightly push for safety reforms. Plenty of workplace disasters also led to public outrage and legally mandated workplace changes. The power of public outrage was at least as important as the unions.
It wasn't just workplace disasters that led to safety reforms, though. In fact, fires in theaters and apartment buildings led to some of the safety reforms associated with unions. Most people today haven't even heard of the Iroquios Theatre in Chicago, but in 1903 the deadliest fire in U.S. history killed more than 600 people. Theaters were dangerous places, with so many lights (often oil) and flammable materials.
It was the Iroquois Theatre fire, not unions, that caused the public to demand fire inspections, revised building codes, and numerous workplace and general safety laws. New York and Chicago led the way, requiring exit plans and the unlocking of major exits when people were present in a building.
In 1911, the Triangle Shirtwaist Factory fire in New York City killed 146 garment workers, most of them women. Managers, in violation of NYC building codes in place since the 1903 Chicago Iroquois Theatre fire, had locked doors and exits to prevent workers from leaving early. The Shirtwaist Factory incident did empower unions, but the owners of the company were violating existing law. It should be noted the owners did face both criminal and civil trials. They were acquitted of criminal actions, but were fined in the civil case and ordered to pay restitution to the families of victims.
So, the first laws to protect anyone in a factory already existed. What the union movement did was stand up to make sure that lax inspectors, often bribed by business owners with political connections, did their civil servant jobs. Unions were important, but what they sought were rights and protections already appearing in state and federal regulations.
This isn't to say unions have no purpose: employers get the unions they deserve. However, we should remember that many claims unions make of forcing through changes to laws and regulations are overstated. The laws often existed before union actions — but admittedly they were not enforced in too many cases.