Yes. Landlords check several things when screening new tenants. Finances are one of them. A bankruptcy says you have had financial difficulties in the past and the landlord has a responsibility to his business to assess the risks before entering into an agreement with you.
As long as the landlord uses the same screening method (employment, credit, rental history) with all applicants, he's acting within the law.