P.M.
Your little guy might simply have a pleasant and relaxing association with nightlights, since he was used to staring at one while you were snuggling him and offering to nurse – probably doing at least some nursing. So staring at a light might still be relaxing for him, maybe slightly hypnotic.
While there's general agreement that more sleep-inducing melatonin is produced in total darkness, providing a nightlight might still result in better sleep overall. It might be worth a little experimentation.
Also, everything seems bigger in the dark (I'm sure you've noticed this yourself). Discomforts, anxieties, impatience, hunger or thirst, loneliness. When we're able to see a thousand details around us, they distract us from our own sensations and thoughts. So it makes sense that your son is distracted enough when he can see the room that more negative feelings don't overwhelm him. So it may not be actual of the dark that fear he's feeling.