As you can imagine, this question is largely a matter of opinion. Some would say that torture is justified for the following reason. The ends justifies the means. In other words, even if torture is not something good, it should be done, if it will save hundred or thousands of lives. This is the strongest argument for torture.
The main negative arguments are as follows. First, all torture is inhumane and therefore simply should not be done. Second, many people will point to the fact that torture does not really accomplish anything as people will say anything under pain. Finally, when a nation resorts to torture, it only aggravates the situation and there will be retaliation.
In the end, there are no easy answers. In my opinion, torture should not be used, even for national security.