First off I need to point out with emphasis that Tali was LOYAL, I had ALL upgrades and she was levelled up to maximum.
Yet for the assignment where you have to select someone to go through the tubed ventilation tunnel to hack open the door, I selected Tali for the job, but she died in the cutscene where she meets up with Shepherd and the assault team at the door. I don't understand why she died? She was a Tech expert yes? which was the primary criteria needed for the task. On my first playthrough I selected Legion and he succeeded. Yet this time Tali dies? She is a Tech expert yes?
Are you positive she was loyal? After you've done both Tali's and Legion's loyalty mission they have an argument like Miranda and Jack has. If you weren't able to pick one of the charm/intimidate options to resolve it, you lost one of their loyalties.