The state of Texas and the Texas Family Code do not mandate that a person be a citizen of the United States to receive a divorce or pursue a custody case. The only residency requirement is that a person must have resided in the state of Texas for the previous six months and resided in the county of filing for the previous 90 days. There is no distinction in the Texas Family Code between a legal or an illegal resident.
A court will not consider immigration status when awarding child custody, child support, property division, spousal maintenance, or any of the other various family law issues one may encounter in the family law court system.
There are immigration status implications for those going through a divorce so it is important to discuss your facts with an attorney if your case involves immigration issues.