PAN is linked with Bank account but that by itself will not be able to open the Bank account details of the account holder unless the bank account number is known.
More so detective agent if by hacking bank account number are able to take out bank account details, they cannot stand as witness in the court to state this fact of hacking the account details of the bank account holder as this is cyber crime by itself. This will expose such hacker to the cyber crime admission and can face criminal prosecution.
Maximum you can use the bank account number/details to summon the bank account details in the court directly from the bank for the period you want to show and prove your case.