Didn't God say to rest on Sundays (or Saturday, something like that)? I'm pretty sure he did that before labor unions or the socialist party existed.
Therefore, we should thank reactionaries.
Genesis says God rested (although most scholars and tradition makes it clear that the word rested just means he stopped creating, not that he was tired and needed a break) on the Seventh Day, which would be Saturday in our calender. The law of Moses thus prescribed that the Jews also rest on the Seventh day, as part of the holiness code meant to draw them close to God and demonstrate the separation between them and pagan nations.
In the early church, at least when it was primarily Jewish, it seems that both Saturday and Sunday were observed as holy days. Saturday remained the Sabbath, a day of rest and reflection. Christ had commanded his followers to meet together from time to time for communion and whatnot, but had not given any schedule. The early church choose to select Sunday as the day to do this, in commemoration of the resurrection occurring on the morning of the First Day of the week. (Sometimes this was seen as the Eighth Day of the week, as 8 in biblical numerology represented a new beginning.) The Lords Day (as it was called) was not a Sabbath, not a day when people would abstain from work. On Sunday they would travel to gather together to meet, have communion, sing songs of praise, discuss any revelation that came from their reflection on the previous day, and organize charitable projects in the community. They did work on the first day of the week, but were offering their first fruits t the lord by beginning the week doing his work. The conflation of the Lords Day and the Sabbath happened when Emperor Constantine declared the Day of the Sun a Roman Holiday, on which there would be no work. (IIrc, more than a third of the days of the year were already holidays. ) This was in Roman Civil Law, and should have no bearing on Church doctrine. The concept of the Lords day and the Sabbath remained seperate for centuries, but gradually became less distinct as the predominately gentile church didn't really celebrate the sabbath anymore. It is not clear whether Constantine had become a Christian Chatechumen yet or if he was still a follower of Sol Invictus, but Sunday was important to both religions.
If I recall, Islam also teaches that the Sabbath applies only to the Jews, but that it is good for believers to regularly meet together. I believe that Friday was chosen by Muhammad rather arbitrarily, just to be different from the other Abrahamic religions. There is a movement today to try to make Friday part of the weekend too.
Working on Sundays was greatly frowned upon in America since before the Revolutionary war. The US constitution specifically mentions that Sundays do not count in the number of days the president has to sign a bill, on the assumption that neither he nor anyone else would eb working that day. I don't think labor unions ha much to do with that, although I won't deny they were important in making Saturday a non work day.