Squate Loyalty is an extremely important mechanic in outcome of Tali's Loyalty mission. It can be regained later, however.
Regaining Tali's Loyalty in Mass Effect 2 requires Shepard to have a high enough ratio of Paragon to Renegade morality points. Ideally, players will have a high enough morality score to not need to choose a side to begin with, preventing any loss of Loyalty. Unfortunately, it is also possible for players to soft-lock their progress and permanently prevent themselves from regaining Tali's Loyalty, which can be dangerous for her both in the endgame of Mass Effect 2 and Priority: Rannoch in Mass Effect 3. Here's what Shepard must do to regain Tali's Loyalty if it was lost during her fight with Legion in Mass Effect 2.
Use Charm or Intimidate Dialogue to Regain Tali's Loyalty
To regain Tali's Loyalty after losing it in Mass Effect 2, Shepard should find Tali down in Engineering following the fight and ask to talk to her. She will be upset with Shepard and try to brush them off. If players have a high enough morality score, they will be able to choose a Charm or Intimidate dialogue option and convince Tali to see their side. She will agree and become Loyal once again. This morality check is somewhat less demanding than the original morality check during the fight.
During the fight between Tali and Legion, if the option to take a Charm or Intimidate dialogue option appears, players should always go that route. This settles the disagreement peacefully, without Shepard needing to take anyone's side, and prevents the loss of Loyalty or any further conflict. Often, however, if players have done Paragon and Renegade interrupts and actions in an equal or nearly equal ratio, if they have failed to collect all possible Paragon or Renegade points available up to that point, or if they have frequently taken the neutral middle dialogue path, it will be difficult for them to the necessary threshold to resolve conflicts peacefully. This can also make it difficult for players to regain lost Loyalty later. While it is not necessary to be 100% Paragon or Renegade, players should consider avoiding neutral options and committing to one morality at least 70-80% of the time to prevent permanently locking themselves out of a way to regain their squates' lost Loyalty.
It is always possible Shepard has missed some potential morality points. If their morality score is too low to use Charm or Intimidate dialogue and convince Tali to become Loyal again, it may be a good idea to return to major hubs like The Citadel, Illium, and Tuchanka to complete any side missions players may have missed. Scanning planets for Anomalies and completing those side missions also rewards morality points that can help buff Shepard's overall score. Players should be careful with this option, however; because Legion's Loyalty mission and the fight between Legion and Tali takes place after the Reaper IFF, there is limited time for players to complete more missions. As they will have already triggered the mission countdown to the Normandy crew being kidnapped, if they choose to complete more side missions after the Collectors take the crew, some or all of the crew will die before Shepard and their team reaches them.
If players are playing as male Shepard and want to romance Tali in Mass Effect 2, and they do not have a high enough morality score to the difficult check during Tali and Legion's disagreement, Shepard should always take Tali's side. If Shepard takes Legion's side, even if they are able to get Tali's Loyalty back in the subsequent conversation, her romance will be permanently locked for the remainder of the trilogy. This is the same as it is with Jack and Miranda.
Should Shepard fail to regain Tali's Loyalty in Mass Effect 2, she should not be selected to lead any of the teams during the infiltration of the Collector base, even those she is qualified for. This includes escorting the traumatized crew back to the Normandy. She should also not be brought along as part of Shepard's squad for the final boss fight. Assuming players secured the Loyalty of all or most other squates and execute the rest of the Suicide Mission flawlessly, Tali can still potentially live and play a part in Mass Effect 3. However, it will be more difficult for Shepard to broker peace between the Geth and Quarians if this happens, as Tali's Loyalty is often needed to trigger the peaceful option.
Mass Effect Legendary Edition is available for PC, PlayStation 4, and Xbox One, with backward compatibility for PlayStation 5 and Xbox Series X/S.