The fundamental sensory input to the sense of vision is through rods and cones in the retina, but these cells only constitutes the very first level of a large network of neurons, beginning with bipolar cells and ganglion cells in the retina itself, followed by interneurons in the brainstem, midbrain and finally the part of the cortex devoted to vision. Neural activity anywhere in this pathway will be interpreted as visual input by the brain, because it eventually stimulates the cells in the cortex associated with seeing. This is a very old realization in sensory physiology, known from the 1830'ties as Johannes Müller's law of the specific nerve energies, stating that neural activity in sensory fibers associated with a specific sensory organ will be perceived as sensory input of that organ itself. This is why pressing (lightly) on the eye will make you see light, because neurons in the retina are mechanically disturbed, which disturbs the membrane potential, which again may lead to the release of action potentials. The same is the case if you suffer a hard blow to the back of the head, where the visual cortex is located. That will make some of the neurons in the cortex fire action potentials, which you will perceive as seeing stars!
Back to your question, where does visual sensations come from in the total absence of light? The answer is the ubiquitous spontaneous activity in nerve cells. Simply by random fluctuations in membrane potentials, some nerve cells will fire now and then,. even in the absence of any input. And as we now know from Johs.Müller, this activity will be interpreted as vision. Adding to this is the fundamental feature of sensory systems known as lateral inhibition, where activity in one neuron suppresses activity in its neighbors. Lateral inhibition is essential for contrast enhancement and makes it possible for the brain to focus on particular parts of the sensory scene. In the absence of any real sensory inputs to the retina, there is also no lateral inhibition, which would otherwise suppress the spontaneous activity in the visual pathway.