To add here: One photon is not going to do anything and you can reason that out from 1st principles.

What is the 'noise' of your retina? How often do the nerves attached to your cones (the blue sensitive ones) just fire spontaneously? It's not 0 even when you are asleep. Just from some basic reasoning you can work out there is a noise floor that your body (each likely unique) learns to ignore. From what /u/herf here says, it's a log scale of input (similar to most detector systems).

From UpToDate: " Nocturnal melatonin concentrations can also be affected by drugs that interfere with the transmission of neurotransmitter signals to pineal cells (like propranolol, a beta-blocking agent) or those that inhibit melatonin's metabolism (like 8-methoxypsoralen), and by a few drugs that lack clear links to melatonin's synthesis or metabolism (eg, caffeine, ethanol).

Nocturnal melatonin secretion is also suppressed by a relatively dim 100 to 200 lux when pupils are dilated. The most potent wavelength for suppressing melatonin secretion appears to be 446 to 477 nm, which differs from the peak absorbances of the photopigments for vision.

Prolonged use of portable light-emitting devices (laptops, tablets, smartphones) before bedtime can have a negative impact on melatonin secretion, circadian rhythms, and sleep. One study compared the effects of reading an electronic book illuminated by a light-emitting device (LE-ebook) versus a printed book (by reflected light) for four hours prior to bedtime for five consecutive nights. Subjects in the LE-ebook group had suppressed melatonin concentrations in the early part of the night, a delayed endogenous circadian melatonin phase, felt less sleepy before bed, took longer to fall asleep, and reported feeling sleepier the following morning. These observations suggest that evening use of light-emitting devices may contribute to phase-delays in the circadian clock and difficulty initiating sleep."

Prehaps /u/herf could tell us about the study that looked at ebooks and if they used f.lux or not as a control.

UpToDate's cited sources are:

Mayeda A, Mannon S, Hofstetter J, et al. Effects of indirect light and propranolol on melatonin levels in normal human subjects. Psychiatry Res 1998; 81:9.

Garde E, Micic S, Knudsen K, et al. 8-methoxypsoralen increases daytime plasma melatonin levels in humans through inhibition of metabolism. Photochem Photobiol 1994; 60:475.

Wright KP Jr, Badia P, Myers BL, et al. Caffeine and light effects on nighttime melatonin and temperature levels in sleep-deprived humans. Brain Res 1997; 747:78.

Röjdmark S, Wikner J, Adner N, et al. Inhibition of melatonin secretion by ethanol in man. Metabolism 1993; 42:1047.

Ekman AC, Leppäluoto J, Huttunen P, et al. Ethanol inhibits melatonin secretion in healthy volunteers in a dose-dependent randomized double blind cross-over study. J Clin Endocrinol Metab 1993; 77:780.

Brainard GC, Rollag MD, Hanifin JP. Photic regulation of melatonin in humans: ocular and neural signal transduction. J Biol Rhythms 1997; 12:537.

Aoki H, Yamada N, Ozeki Y, et al. Minimum light intensity required to suppress nocturnal melatonin concentration in human saliva. Neurosci Lett 1998; 252:91.

Brainard GC, Hanifin JP, Greeson JM, et al. Action spectrum for melatonin regulation in humans: evidence for a novel circadian photoreceptor. J Neurosci 2001; 21:6405.

Chang AM, Aeschbach D, Duffy JF, Czeisler CA. Evening use of light-emitting eReaders negatively affects sleep, circadian timing, and next-morning alertness. Proc Natl Acad Sci U S A 2015; 112:1232.