For a lot of information, like your school transcripts, medical records, or military service records, your employer needs permission first. An employer also needs your permission if they use an outside agency to gather any background information. If an employer gets your background report without your permission, you can contact the Federal Trade Commission (FTC).
However, employers can find out a lot about you without needing your permission just by typing your name into Google. When applying for a job, make sure to Google yourself so you know what shows up and can attempt to fix any wrong or unfortunate information.
Like background checks in general, while the laws vary between states, employers generally can perform drug tests, and in some cases are required to do so. However, an employer’s drug testing policies must be written down, accessible to employees, and applied equally to all applicants and employees.
In a situation like this, the more relevant law may be discrimination law as opposed to the laws about background checks. The EEOC is the federal agency responsible for enforcement in this area. When an employer inquires about your background, the employer must treat you the same as everyone else, regardless of your race, national origin, color, sex, religion, disability, genetic information, or older age. Even if the employer treats you equally, using background information still may be illegal discrimination.
"The cost of liberty is less than the price of repression."
–W.E.B. Du Bois
from Economic Policy Institute