Yes, text messages can be used in court to prove adultery if they provide evidence of an extramarital affair.