Immediately after finishing a long rest.
This language is clarified in the Sage Advice Compendium concerning preparing spells. The Wizard's spellcasting featureWizard's spellcasting feature says:
You can change your list of prepared spells when you finish a long rest.
The SAC goes on to clarifySAC goes on to clarify what this means:
Can spellcasters prepare spells not all at once, but prepare spells at various times in the day?
You prepare your list of spells only at the end of a long rest. You can’t prepare some spells at the end of the rest and then prepare more later.
So when the Artificer's infuse itemArtificer's infuse item feature says:
Whenever you finish a long rest
It means immediately after the long rest, in the same way that it does for preparing spells.