Makes you think doesn't it? It has become more and more common for divorcing parties to try (and many times succeed) to monitor their spouse's texts, phone calls, emails, and social media messages (like Facebook, etc.). They simply sign in to the service because they still have the account number/settings/password from when they were still living with their spouse.
Is this legal?
Well the following article discusses this issue and just what you may or may not be able to access and/or keep your spouse from accessing.
Always talk to your attorney for the rules on this in your own jurisdiction. As you can see from the article, some or all of this type of activity may be prohibited by local law and/or the orders that have been entered in your case. So beware!
Note: What you can control however are the settings/passwords, etc. on your accounts once you separate. Its probably prudent to change them immediately. But again, consult your attorney!