How does documentation affect immigrants' rights in the United States?
Documentation is everything. Permanent resident aliens with valid green cards have most of the same rights and privileges as citizens, and naturalized citizens have all of them (except for running for President, for some reason). Permanent residents can work here permanently, use public schools, and apply for services such as Social Security and Medicaid. Naturalized citizens can do all these things as well as even vote and run for office.
Undocumented immigrants, however, can do none of these things. In most states they are ineligible for all government services except for emergency services (though in some states they can use public schools). They can be arrested, detained, and deported, essentially whenever Immigration and Customs Enforcement wants to do so. While most undocumented immigrants try to find work, they cannot legally work for formal employers and so they usually end up working under the table for below minimum wage.
Knowing this, why would anyone not become documented? Because it's simply too difficult. The multiple layers of bureaucracy, high costs, and absurdly long delays (on the order of years or even decades) to obtain permanent residency or citizenship prevent millions of immigrants from obtaining citizenship even though they desperately would like to and should be eligible.
Many laws in the United States affect all people equally, regardless of immigration or documentation status. For example, labor laws concerning safety, minimum wage laws, and the right to compensation if injured at work apply to all workers. Other forms of contract law also apply to all people as does the right to emergency treatment at a hospital. All people, documented or not, have the right to due process as defined in the fourteenth Amendment to the US Constitution and other similar rights such as protection against unlawful search and seizure and cruel and unusual punishments.
It is illegal for undocumented people to work in the United States. Undocumented immigrants are not eligible to vote or hold public office. Undocumented immigrants cannot collect unemployment insurance, social security, or many other forms of federal benefits.
Many of the rights which vary according to documentation status also vary from state to state. In some states, undocumented immigrants can obtain driver's licences but in others they cannot do so. All children, whether documented or not, do have the right to K-12 public education.
Most importantly, undocumented immigrants do not have the legal right to be in the United States and thus are subject to deportation.