Here's all the information I got from my own playthrough and from the BioWare forums:
Each missing upgrade will result in a team member dying. If you take this teammember with you during the oculus fight, someone else dies.
-No Solaris Armor. Oculus beam slices through the bottom of the Normandy: Jack dies (don't know who's the alternative death).
-No Cyclonic Shielding. Engine core overloads: Tali (or Jacob) dies.
-No Thanix Cannon. Normandy goes Charge of the Light Brigade on us: Garrus (or Thane) dies.
-If the Tech Specialist is not one of those listed below, they will die at the first rendevous.
-If the Heat Exchanger valves are not opened in time, the Tech Specialist will die and you have a game over
-If the first Fireteam Leader is not a leadership character, the Tech Specialist will die at the first rendevous.
-If the second Fireteam Leader is not a leadership character, they will die at the second rendevous.
-If the Biotic Specialist is not powerful enough, one of your current squad members will be swarmed by seekers and die.
-If the crew survivors are not escorted, they will die.
The following characters are the only ones that will succeed at their tasks:
-Tech Specialist: Tali & Legion
-Leadership: Miranda, Jacob & Garrus
- Biotic Specialist: Samara / Morinth & Jack
-Crew Escort: Anyone works
Not having a character's loyalty has different effects depending on what you do with them:
-Having disloyal characters in the above key roles will result in deaths, regardless of whether they are suitable or not.
-A disloyal crew escort will sacrifice their lives to protect the crew (the crew will still make it).
-Disloyal characters do not necessarily die if they are left to hold the line while Shepard fights the last boss.
-Keeping disloyal characters in your active squad prevents them from dying, except for...
-In the final boss fight, disloyal characters in your active squad will be crushed by rubble after the fight and die.
-If all team members are dead, Shepard misses the final jump and lets himself fall to his death rather than risk Joker's life (note that if you have all 11 teammembers, it doesn't apear to be possible to get them all - and thus yourself - killed).
If you do not go through the Omega-4 relay quickly enough after the Collectors kidnap the Normandy crew, the captured crew members will die off in the endgame. Who dies depends on how many missions you did after Joker plugs in the Overlord. Note that you can go anywhere you want in the galaxy, visit any shop, talk to anyone you want; only doing missions matters.
-If you use the relay immediately, everybody survives; Horizon colonist gets liquified instead.
-If you do one mission, Kelly, engineer Daniels, mess sergeant Gardner, and half the crew dies.
-If you do two missions or more, everyone except Dr. Chakwas dies.
The only random thing left for me is the part at the end where the remaining team must hold the line until Shepard kills the Contra throwback
. It seems Mordin dies most often, but I've also seen posts from people for who Thane or Jacob kicked the bucket.
Character upgrades, loyalty and time taken to kill the boss doesn't seem to affect this. The current theory over on the BioWare forums is that either how well you dealt with people's loyalty quest or if you deliver a rousing speech has influence.
Yeah, maybe I'm overanalyzing this.