No, it is not illegal to reject anyone that doens't meet your standards. And you don't have to accept a co-signer. You can set the standards for what you require. Just be sure to apply those standards to everyone or you could fair discrimination. If a bankruptcy denies this person, then it must deny all or someone could raise a discrimination claim against you.
To avoid possible cases of discrimination or fair housing issues, a landlord should have their rental criteria clearly stated in writing as part of the application, and all applicants must be held to the criteria *equally*.
Do you have a history of not accepting those with bankruptcies on their credit regardless of the age of the bankruptcy?
Is your acceptable credit score clearly spelled out in your rental criteria?
Do you state whether or not you accept co-signers in your rental criteria?