From The Wiki [http://masseffect.wikia.com/wiki/Mass_Effect_2_Guide]
Biotic Specialist
Ideal: Samara/Morinth or Jack.
Non-Ideal: Anyone else. Doing so will result in one of your squadmates being carried off by a Collector swarm.
Fire-team Leader
Ideal: Garrus, Jacob, or Miranda. Note that Miranda will not die here even if disloyal.
Non-Ideal: Anyone else. There is a possibility of this leader dying as the doors close at the end of the long walk (shot in the stomach as the door closes).
An Escort
Ideal: Mordin. This will ensure his survival because he has a strong chance of dying if he doesn't escort the crew back, even if he is loyal. Otherwise, any loyal squad member is guaranteed to successfully escort the crew back to the ship.
Non-Ideal: A team member that you have not secured loyalty from. This squad member will perish while escorting the Normandy crew. Also, a squad member with a high "defensive skill" value (Grunt, Zaeed, Thane), as this may indirectly cause Mordin's death if he is left to hold the line.
Final Battle
The team you pick here will stay with you for the rest of the suicide mission ? you will be fighting against Drones, Harbinger, Assassins, Abominations, Scions, and one giant Human-Reaper larva.
Ideal: Squad members that are loyal to you and are less suited for defensive tasks such as Mordin, Jack, Kasumi, and Tali.
Non-Ideal: Squad members that are not loyal to you. They will die after the battle as the Collector station begins to fall apart.
Note: The teammates you do not pick are automatically assigned to hold the line from the Collectors. A 'defensive skill' value is calculated for the 'hold the line' group as a whole, based on a defensive value inherent to each character. Loyal characters gain a bonus to this value. If the 'defensive skill' check is not high enough to ensure all characters' survival, squad members will be designated to die based on their vulnerability, with Mordin taking priority if he is present. Leaving behind strong defenders, such as Grunt, Garrus, and Zaeed will increase the group's odds of survival. In contrast, certain characters such as Jack, Tali and especially Mordin have less skill in holding their position and should be removed through escort duty or taken along. The entire group will survive as long as the combined defensive skill is high enough, otherwise the game picks a squad member to die based on the scenario of who was left behind and how loyal the group members are. (Squad members who are not loyal are most likely to survive here than anywhere else, provided the group's collective defense skill is high enough, although they will be the first to die if the skill is not.) Leaving behind two strong defenders like Garrus, Grunt, or Zaeed should suffice, provided you haven't lost too many people.
Note: The order squad members die is as follows: any non-loyal squad members, Mordin, Tali, Kasumi, Jack, Miranda, Jacob, Garrus, Samara/Morinth, Legion, Thane, Zaeed, Grunt