There are a number of specific limitation on what can be made criminal in US law, derived from constitutional protection.
Expressions of free speech, for example, cannot be made criminal, although there can be laws which regulate or impact speech to a degree. Similarly, the establishment clause of the First Amendment prohibits a law requiring people to attend a particular church, and he free Exercise clause prohibits any criminal penalties for any religious practice or lack of practice.
Most of the other provisions of the Bill of right would impose similar limitations. The legislature cannot criminalize what people have a constitutional right to do.
Thre are also specific limitations not in the bill of rights, such as the prohibition of Ex Post Facto laws, the right to trial by jury, and the constitutional limitation of Treason laws.
Beyond that the Due Process clause of the 5th and the parallel clause of the 14th impose limits on criminal law generally. Criminal laws must have (at least) a rational basis. The legislature cannot just prohibit picking up papers because they felt like it, they must have articulated a problem and a plausible reason why a given law would address it. If they don't the law may be overturned as unconstitutional.
If a law is challenged as being unconstitutional, it will currently either be subject to rational basis analysis, or to one of the stricter levels. However a law which cannot pass rational basis analysis will not survive intermediate scrutiny or strict scrutiny either. Laws which appear to invade one of the enumerated rights, or a right that the Court has deemed "fundamental" are normally tested under either strict or intermediate scrutiny.
According to the the Wikipedia article:
Courts applying rational basis review seek to determine whether a law is "rationally related" to a "legitimate" government interest, whether real or hypothetical. The higher levels of scrutiny are intermediate scrutiny and strict scrutiny.
laws implicating unenumerated rights that the Supreme Court has not recognized as fundamental receive rational basis review.
In modern constitutional law, the rational basis test is applied to constitutional challenges of both federal law and state law (via the Fourteenth Amendment). This test also applies to both legislative and executive action whether those actions be of a substantive or procedural nature.
The rational basis test prohibits the government from imposing restrictions on liberty that are irrational or arbitrary, or drawing distinctions between persons in a manner that serves no constitutionally legitimate end.
A court applying rational basis review will virtually always uphold a challenged law unless every conceivable justification for it is a grossly illogical non sequitur.
(See Killian, Johnny H., George A. Costello, & Kenneth R. Thomas, co-eds., The Constitution of the United States of America: Analysis and Interpretation: Analysis of Cases Decided by the Supreme Court of the United States to June 28, 2002, by Congressional Research Service, Library of Congress (Senate Document No. 108-17, 108th Congress, 2d Session) and specifically Romer v. Evans, 517 U.S. 620 (1996) at 635)
Rational Basis analysis became accepted after the demise of "substantive Due Process", mostly in a civil, rather than criminal context. A version of it was suggested in Lochner v. New York 198 U.S. 45 (1905), in the dissent by Justice Holmes. It was adopted as governing in [*Nebbia v. New York *
In United States Department of Agriculture v. Moreno 413 U.S. 528 (1973) The Court overturned, on a rational basis scrutiny, a law excluding households consisting of unrelated people from the Federal Food Stamp program, writing:
[A] bare congressional desire to harm a politically unpopular group cannot constitute a legitimate governmental interest.
In Eisenstadt v. Baird 405 U.S. 438 (1972) a law that criminalized the distribution of contraceptives to unmarried persons was overturned on a rational basis review. Similar cases are now generally treated with intermediate scrutiny.
In James v. Strange 407 U.S. 128 (1972). a Kansas law reclaiming payments for public defenders was overturens on rational basis review as “an impermissible burden on the right to counsel established in Gideon v. Wainwright."
In Bowers v. Hardwick 478 U.S. 186 (1986), rational basis analysis was employed to sustain a statute criminalizing homosexual activity. However, this was later overturned..
Also under Due Process, vague laws are prohibited. If a reasonable person cannot tell from the law what is or is not illegal, the law can be overturned for vagueness.
Then there are procedural limits, also largely derived from the Due Process clause(s). A law cannot automatically convict people without a genuine hearing, in which a person can present a defense to an independent, impartial judge or jury. A law cannot impose duties which are flatly impossible to perform. A law cannot impose punishments which are considered unreasonable for the seriousness of the crime (as evaluated by judges).
There are other limits as well, it would take a book to list them all in detail. But those are some of the more frequently applied ones.