After leaving a job, a former employer is free to pass along negative information about you to prospective employers, and most state laws protect them from legal recourse provided the information is - job related; based upon credible evidence; and made without malice.
It is illegal for a former employer to purposefully give false information for the sake of harming one's reputation or preventing one from obtaining employment. In addition, personal information that is not job related should neither be asked about or provided by either a prospective or former employer. In general, it is inappropriate for a prospective employer to ask questions or a former employer to provide information about an individual's race, color, religion, sex, national or ethnic origin, age, disability status, marital status, sexual orientation, or parenting responsibilities.
Former employers who fear potential defamation and slander law suites have become crafty when answering employment reference questions. Rather than speak negatively about a former employee, some will opt to "No Comment" when asked critical employment questions regarding performance, termination, and eligibility for rehire. The inference of this is just as harmful to the employee as a bad reference, and if a prospective employer has to choose between two qualified applicants - one with positive references and the other with mediocre or bad references - who do you suppose they will choose?
Another common practices among leery employers is to refuse to give any information about an employee other than dates of employment and title.
This is gross disservice to an employee who has dedicated years of faithful service to a company, yet gets no better of a reference then an employee who was fired for embezzlement. Unfortunately, this policy is within the legal rights of an employer provided the policy is an across the board policy that applies to all employees - not just a selected few. There have been cases successfully argued that an employer discriminated against an employee for not applying the same policy to all its employees.
Employment laws vary significantly from state to state. You should consult an attorney in your state regarding specific legal questions. If you suspect your former employer is giving you a bad reference, or of something more malicious like slander, defamation, or blacklisting, you should consider investigating your references