If you were a co-signer, then the lender could go after you for any deficiency. However, you may still have claims against your ex-wife based on the divorce decree or property settlement agreement. If this car loan was part of that decree, then it may even survive bankruptcy.
[This communication is intended as general information and not specific legal advice, and this communication does not create an attorney-client relationship.]
In addition to the possible claims based on the divorce decree, you may have a defense to a deficiency - assuming there is one after the car is sold - if the lender did not follow all of the legal requirements for repossession, such as sending a notice after the car is repossessed that includes information about the sale, or if the sale was not "commercially reasonable." If all of the legal requirements were not followed, then you may have a claim for damages, or a claim that the lender can't pursue you for a deficiency.
You should contact a lawyer to see if the repossession was conducted properly, and if the notice was sufficient, or if there are any limits on deficiencies that may apply to your situation.
If you need help locating an attorney, please feel free to contact me.
You can also take a look at my legal guide "Has Your Car Been Repossessed: A Legal Guide To Your Rights After Repossession"