In order to earn three stars for a mission, you're required to complete the mission within the time limit without having any Heroes knocked out. If a Hero is knocked out, you'll only be able to receive two stars max.