"The term blue law ... historically defined a body of regulations designed to preserve the Sabbath by proscribing most labor on that day. Some such restrictions date to as early as the 13th century in England. Colonial settlements enacted similar laws with the explicitly religious intent to prevent unseemly activities on the Sabbath."
The Supreme Court ruled in 1961 that while Sunday blue laws may have religious origins, they do not violate the First Amendment’s establishment clause.
www.mtsu.edu
"The earliest laws in North America addressing Sunday activities and public behavior were enacted in the Jamestown Colony in 1619 by the First General Assembly of Virginia. Among the 70 laws passed by the Assembly was a mandate requiring attendance by all colonists at both morning and afternoon worship services on Sundays. The laws adopted that year also included provisions addressing idleness, gambling, drunkenness, and excessive apparel.[12] Similar laws aimed at keeping the Sabbath holy and regulating morals were soon adopted throughout the colonies.[13]"
en.wikipedia.org
Sunday blue laws raise First Amendment concerns because they favor Christianity
As such, the laws raised constitutional concerns under the First Amendment. The establishment clause of the First Amendment specifically prohibits any law “respecting an establishment of religion.” By designating Sunday as a Sabbath and by restricting the activities of individuals on that day, states with Sunday blue laws were arguably favoring Christianity over religions that celebrate different Sabbaths.
Litigation over Sunday laws was common throughout the 19th century and the first half of the 20th century.
The Supreme Court finally ruled on the matter in 1961 in McGowan v. Maryland, a case filed by employees of a large department store ....They argued that the statute was intended to encourage church attendance and to induce those with dissenting religious beliefs to join predominant religious groups in their Sabbath.
The court, while acknowledging the religious origins of the Sunday blue laws, held that they were constitutional.
(And) were permissible regulations under the state’s police powers to regulate in the interest of public health, safety, welfare, and morals and that the regulations sought to provide a day for leisure and family, not to impose a particular set of religious practices.
The Supreme Court ruled in 1961 that while Sunday blue laws may have religious origins, they do not violate the First Amendment’s establishment clause.
www.mtsu.edu