As far as I’m aware, “perceiving light and seeing visions”, or, as Bhikkhu Bodhi translates it, “perceiving light and seeing forms”, isn’t further explained in the early discourses. Of course, the commentaries have their own explanations of it.
Those two phrases together do seem to be associated with development of the divine eye. They show up again in MN 128 (with the only change being a different word for “seeing”). Some take MN 128 to be describing the Anuruddha’s and his companions’ difficulty in developing the jhānas and the Buddha’s sharing of his own difficulties in developing the jhānas. The evidence for this is the description of the threefold samādhi at the end of the sutta.
My personal opinion, though, is that both suttas are describing the difficulties of developing the divine eye. We don’t really see jhāna typically being associated with light and forms in other suttas. AN 4.41 does describe a development of samādhi that is associated with the perception of light (using different verbiage than the suttas above) and is definitely not associated with the jhānas (because the jhānas have already been listed as a separate development of samādhi). I’ve wondered if this development of samādhi associated with the perception of light is referring to the divine eye.
Another bit of circumstantial evidence is that MN 128 is a sutta featuring Anuruddha, known as the foremost disciple in the divine eye.
It’s also interesting to note that the Chinese parallel to MN 128, MĀ 72, describes the Buddha recalling his reaction to perceiving light and seeing forms as being “’What in the world does not exist; can I see and know that?’, in my mind this doubt arose”. To me, this fits well with how one might react when seeing devas for the first time.
MN 128 is often cited as evidence that the jhānas are very difficult to attain. Regardless of one’s views on that, it seems to me more likely that it is describing an even more difficult skill to attain: the divine eye, which was a much rarer skill to possess than jhāna. Not even all arahants had this skill (notably Sāriputta).