A prisoner who says he was tortured while being held for nearly four years as a suspected terrorist can sue former Bush administration lawyer John Yoo for coming up with the legal theories that justified his alleged treatment, a federal judge in San Francisco ruled Friday.