Like many states, Texas has a law that protects the right of an employee to join or not join the union. Such laws are commonly known as “right-to-work” laws. The Texas law makes null and void any contract that requires a worker, as a condition of continued employment, to join a union. Union contracts calling for union shops (in which new hires must join the union within some specified period of time) and agency shops (in which employees don't have to join the union but have to pay a fee instead of union dues) are banned under the right-to-work law (TX Labor Code Sec. 101.052).
Texas has made it illegal to deduct any money from an employee's pay that will be given to a labor organization without first obtaining the written consent of the employee (TX Labor Code Sec. 101.004). There is additional information.
Contracts in which an employee pledges to avoid union membership as a condition of employment (so-called “yellow dog” contracts) are void and against public policy as a matter of Texas law.
Unions may sue and be sued under Texas law.