California in 2005 made such a law:
California’s law imposes fines of up to $1,000 on retailers that sell violent video games to anyone under 18. To qualify, a game must, as a whole, lack serious literary artistic, political or scientific value for minors.
It was ruled as against the First Amendment, but the Supreme Court reviewed it this year again.
The New York Times wrote an editorial hoping that "the law is unconstitutional" based on the notion video games are a form of free expression. The editorial ends with:
California lawmakers may have been right when they decided that video games in which players kill and maim are not the most socially beneficial form of expression. The Constitution, however, does not require speech to be ideal for it to be protected.