New York State’s top prosecutor is investigating some of the nation’s largest banks in connection with their use of credit-reporting databases that disqualify people seeking to open checking or savings accounts — an inquiry that has gained urgency as the ranks of the unbanked has swelled in the aftermath of the financial crisis.