Hitchhiking is legal in many places in the U.S. and in many other countries. State laws that prohibit hitchhiking are often vague, and many cities and counties have regulations involving hitchhiking that are quite varied. Some of these laws are probably unconstitutional, but many laws in recent decades have not prohibited the act of hitchhiking itself; rather, the laws prohibit hitchhiking in certain areas or circumstances (e.g., on limited access highways, where hitchhiking impedes a right-of-way on public roadways, in areas where a determination has been made that prostitution is occurring, etc.).
Whether hitchhiking is allowed in a certain area often has little bearing on whether local law enforcement will create a traffic stop of a hitchhiker or vehicle.