Light enters your retina and is detected by photoreceptor cells, of which humans have 3 specialized kinds- rod cells, cone cells and photosensitive retinal ganglion cells. The retinal ganglion cells are a bit different than the rods or cones, as they do not help you see directly, but sense light none the less, and use that information to help with circadian rhythms to regulate sleeping, and to help pupils know when to contract or dilate.
Rods and cones are a bit more straight forward. Cones are the cells that detect colours. They require quite a bright light input (a lot of photons), and they exist in 3 different forms, corresponding to short, medium and long wavelengths of photons. The photons with shorter wavelengths are shades of blue and purple, the medium ones green and yellow, and the longer ones, orange and red. Rod cells on the other hand need only a single photon to activate, but are not sensitive to different wavelengths (colours) of light. In low light settings, only rods are activated, so we see in grayscale.
What’s especially interesting though is that non-light energies can activate the proteins in these photoreceptor cells too. From time to time, your eye cells will respond to heat, thermal energy, as opposed to light. Functionally, this seems no different to us, as our brains interpret the cells activating all the same, regardless of the activation source, but theoretically this means that in a pitch black room, a warm compress on your eyes could make you ‘see things’. Our eyes also react to heat in everyday circumstances, but we don’t really notice, since most bright light sources also produce heat.
In a slightly different way, physical energy, transferred to your eye by pressing on it can also activate the photoreceptor cells, causing you to ‘see things’. Test it for yourself by closing your eyes are rubbing them!