Can the U.S. president make military decisions without consulting anyone?
Can he? Yes, he can. (That much is trivial.)
Would it be legal? According to the constitution, it seems like it, at least in an emergency: "the Justice Department’s Office of Legal Counsel has claimed that the Constitution authorizes the president, as commander in chief, to order the military to attack other countries without congressional permission" (https://www.nytimes.com/interactive/2019/us/politics/presidential-war-powers-executive-power.html). So the civil checks are off, in the opinion of the OLC which is, one could say, the authority on that matter, biased as it may seem on occasion. As far as the military side is concerned, he is commander in chief, which kindof settles the matter, if I understand correctly the prime directive of the military: Follow orders.
This covers national law; the international law is less clear, but of course there have been convictions for crimes against humanity or war crimes. In most cases such trials (which will determine legality or illegality) are only possible against governments of defeated nations or ousted leaders, which makes the probability of such a determination for actions of an American president unlikely, unless Congress brings itself to impeach. Conceded, nuking another nation for no good reason would likely raise the chances of an impeachment.
Would the president's solitary military decisions be executed? Now here is an interesting question, which was discussed in another New York Times article. It appears that while the military chain of command is clearly defined, orders can be executed with different levels of expedition and eagerness. Not every command from the top may be executed without delay and detour. This is more likely when the president is under unrelated stress or his judgement appears otherwise impaired. To quote another New York Times article:
In real life, the lines of authority have blurred — markedly so during the Nixon administration, when there were at least two instances in which top officials tried to slow, or undermine, the president’s nuclear authority.
President Trump's judgement was questioned from a different angle — there was some debate about his sanity when he entered office. Apparently it was just above a level that would have warranted removing him from office for medical reasons.
An anonymous opinion piece from a White House senior official in the New York Times stated:
Some of his aides [...] have gone to great lengths to keep bad decisions contained to the West Wing, though they are clearly not always successful. [...]
It may be cold comfort in this chaotic era, but Americans should know that there are adults in the room. We fully recognize what is happening. And we are trying to do what’s right even when Donald Trump won’t.
The other article concluded:
“In some scenarios,” Mr. Sagan [a nuclear expert at Stanford University] added, “such as an unprovoked nuclear attack by a president in peacetime, a constitutional crisis would be more likely than a prompt following of rules regarding succession and command authority.”