They have no such authority, none, nada, zippo. The constitution is quite explicit about that, the power to declare war resdies in the Congress. How they declare war also resides in the Congress. The judiciary has squat to say about it.
I honestly don't see what the problem is with just declaring war, especially in the case of Iraq.
The power to declare war is not the issue. The issue here is the power to decide what the law and the Constitution means, and to decide what laws have been passed by Congress. The Court in this case rightfully used its Constitutionally-granted authority to decide that the Constiutition requires an explicit statement by Congress authorizing the President to use his war powers to indefinitely detain enemy combatants.
How they declare war also resides in the Congress. The judiciary has squat to say about it.
But Congress has never passed any law that defines how war is to be declared. If Congress abdicates its authority to define how war is declared, the courts have no choice but to decide whether or not there is a war by some standard other than one defined by Congress (since Congress hasn't defined one.)
And the courts must determine whether or not a war exists, since by their own previous precedents, what is and is not legal depends upon whether or not there is Constitutionally a de jure war (note: not a de facto one.) The courts do not determine whether a war exists sua sponte (which only Congress can do,) but via the same procedure they determine what the law is (note: only Congress can determine what the law is sua sponte.)