Whenever you take unilateral action that alters the financial status quo, you must be prepared to offer a reasonable explanation to the judge for your actions and be able to account for how the money has been handled.
If the suit was filed in a county that uses Standing Orders or you were served with a Temporary Restraining Order, you are probably prohibited from closing accounts. If you are not under such orders, you are free to close the accounts. However, you should consider the possible consequences. Closing an account without notice to your spouse may increase the hostility level and foster mistrust. Further, it may cause checks to bounce and create difficulties with creditors.
If you believe your spouse is likely to spend or hide money from an account, it may be wise to place the funds beyond your spouse’s reach by depositing it in a new account. If you do so, you should leave sufficient funds in the old account to cover any outstanding checks and a reasonable sum for your spouse’s use.