Although we view divorce as something that not only affects us as people but also our finances, getting a divorce in and of itself will not affect your credit score or report. At least, not directly; the financial issues that stem from the divorce process, however, could very well impact your credit. This can be especially true if the divorce process includes joint credit accounts between the spouses, as that will significantly affect your future credit.
If you do have a joint credit account, you should certainly meet with your accountant and either close the account entirely or ensure that one of the names, either yours or your spouses, are completely removed from the account.
In a divorce decree, a court will often specify which of the parties is responsible for any accounts that had been opened during the marriage. Even in this case, if both names are on the account, they are both still under contract with the credit lenders, not just who was named responsible for the account.
What you should look out for is just prior to the actual divorce trial. Often, an angry spouse will try to financially harm their soon-to-be ex by making huge credit expenditures, with the intention of creating huge financial debts for the spouse, and ultimately destroying their credit history, which comes with its own set of awful consequences.