Banks have the right to choose not to do business with potential depositors. If they have information that indicates that a potential depositor failed to honor obligations with them or a prior bank, they are able to say no to a new relationship with you.
I am unclear about what you are saying regarding them taking a check from you. If they have funds of yours and yet won't allow you to open an account with them, they have no right to retain yoru funds.
Did you have a prior charge off with that bank. Many banks have the right to claim a recovery if you present a check to cash and you owe the bank money.