As far as I know, there's no law that prohibits a Landlord from renting a house to an illegal immigrant in Texas.
The Landlord is not obligated to ask if the tenant is legal or illegal. Usually though, the Landlord will ask for a valid form of I.D. for their records.
My lay person answer is this:
Some cities have laws against renting to illegal immigrants.
Some people might argue ...how are landlords to know if the tenants are illegal or not. We don't ask that on an application.
Now a bored DA might try to prosecute a landlord who knowingly and intentionally harbors a criminal.
There are some risks you take, but then again how would you know?
Great question for your attorney.