A landlord may want to get information from current and prior landlords to determine whether you will be a good tenant.
Prospective landlords may ask you to list where you have lived in recent years, including contact information for prior landlords. They may also ask you to sign a form giving them permission to contact a former landlord in order to ask information about you as a tenant, although they do not have to ask you permission to do this. However, refusing permission may result in being rejected.
Before contacting prospective landlords, it may be a good idea to contact former landlords and tell them that they may be receiving a reference request from another landlord. If you are afraid that a former landlord may unfairly give you a bad reference, one thing to do is to ask that former landlord for a simple reference letter that says you paid the rent on time. You can also show them that certain circumstances have changed. For example, if you lost your job and were unable to pay the rent, but now you have a job and can pay the rent, this is important information to provide.
If there were times when you were not renting, you should identify those gaps on your application. A landlord may deny you housing if she believes that gaps are an attempt to hide a negative landlord reference. So explain gaps in your rental history, such as if you were living with family or friends, living in an emergency shelter, or some other situation.
If you have no rental history, try to use other sources of information that demonstrates your ability to pay rent on time and take care of an apartment. For example, car loan or insurance payments can show that you will pay the rent on time and letters of reference from clergy, shelter staff, or employers can show that you will take care of the apartment and respect the rights of others.