In a 5-4 decision, the U.S. Supreme Court held that the Second Amendment applies to the states via the incorporation doctrine and states can not violate the right to keep and bear arms any more than the federal government can.
The case itself:
McDonald v. Chicago