That sounds like a tech question and not necessarily a legal question. When you say that you "lost" it, do you mean it has somehow been deleted from your phone? If that is the case, you should contact your cell phone provider to see if there is a way to retrieve the information. If they can't help you, a court order probably won't do you any good.
If the text was somehow reduced to writing and provided to the court previoulsy, it will be in the court record and you can go down to the court and obtain a copy for a small copy charge.
Sign up to receive a 10-part series of useful information and legal advice about the divorce process.