In the US, there is no one central database listing all bank accounts. In most cases, this information is obtained from public records of another kind, such as divorce cases and probate filings.