At what exact moment in a presidential transition does the outgoing president lose and the incoming president gain the authority to launch a nuclear strike?
The Twentieth Amendment to the U.S. Constitution specifies that
The terms of the President and Vice President shall end at noon on the 20th day of January
This is approximately the time that the Oath of Office occurs during an inauguration ceremony, though the constitution suggests that the specific moment of transition is 12:00pm, no matter when the Oath takes place. (Notably, if January 20 falls on a Sunday, the inauguration ceremony is postponed until Monday but a private Oath of Office is still taken at noon on January 20. This was the case for Obama’s second inauguration.)
As for the military officer carrying the nuclear football, Attn reports that they enter the inauguration following the outgoing president, and leave with the incoming one.
But that does leave open a significant window of time where it’s a little unclear who exactly they would take orders from. Say there were an attack during the inauguration (which left both the outgoing and incoming presidents capacitated). Who would be in charge?
A strict reading of the constitution would imply it simply depends whether it’s before or after 12:00:00 EST. A more traditional (as in, literally based on tradition) approach would be when the Oath of Office is completed, when the d of God is, by the president, uttered.
Presumably, this is addressed as part of the presidential military aide’s schedule or instructions, but those are both top secret.
One of the basic ideas of American government is that "there is only one president at a time". If you google that expression, you'll see lots of references to the Trump-Obama transition, and a few to previous presidential transitions (since the internet tends to be weighted to the present).
At exactly noon on the January 20th following a US presidential election (per section 1 of the 20th amendment to the constitution), the incoming president takes the oath of office, and presto, he's the president and the previous president is out of a job. Until that moment (exactly noon, ET), the old president is in charge - he/she can deploy troops (see George H. W. Bush and Somalia), he/she can issue pardons (Bill Clinton pardoning Marc Rich), etc. without any consultation with the incoming president. After the stroke of noon, he has zero presidential power.
The codes are updated upon the inauguration. Note that Bill Clinton actually managed to lose the codes once.
Section 1 of the 20th amendment to the US constitution says
The terms of the President and Vice President shall end at noon on the 20th day of January ... and the terms of their successors shall then begin.
So that essentially answers your question. The transition happens at the stroke of 12 noon (eastern time) on January 20th.
However, Article II, Section One, Clause 8, of the United States Constitution says
Before he enters the Execution of his Office, he shall take the following Oath or Affirmation:—"I do solemnly swear (or affirm) that I will faithfully execute the Office of President of the United States, and will to the best of my Ability, preserve, protect and defend the Constitution of the United States."
So the incoming president must first take the oath before he can do anything. This leaves a gap of a few minutes (depending on how the inauguration ceremony is keeping to schedule) where neither the incoming nor outgoing president has the legal authority to give executive orders.
I assume this is really not a problem. The president is often unavailable for a few minutes (e.g. in the restroom). In the unlikely event that something critical happened at 12:01, the incoming president would probably quickly recite the oath and take charge, curtailing the ceremony.