We have theories in which this is actually the case!
There's a class of dark matter candidates known as dark photons. There are many different theoretical variants, but they all involve a new boson corresponding to a $\mathrm{U}(1)$ gauge symmetry, much like the photon - and so the dark photon gets its name not because it has anything directly to do with the electromagnetic force, but rather because it obeys a similar mathematical structure. In some models, this dark photon interacts with dark matter; in others, it's actually the main component. This has led to plenty of experimental searches for dark photons, both in particle accelerators and in astronomical observations.
This doesn't quite satisfy your requirements - there's a difference between photons and particles that obey the same symmetries. Fortunately, we can invoke something called kinetic mixing, a predicted phenomenon in which dark photons could in fact change back and forth into regular photons, analogous to neutrino oscillations. This provides a mechanism for light to not just be responsible for dark matter, but to actually be dark matter.
We don't know if this is the case in our universe, but it's theoretically possible to have self-consistent physics in which dark matter and photons are intimately related - and that's all you need for yours.