The problem here is the contrasting effects the two forms of matter have.
Photons are massless; they create negligible gravitational fields.
Dark matter, on the other hand, is about 85-90% of all mass in the universe. It's responsible for holding galaxies at constant rotation rates past certain radii (see Galactic Rotational Velocity Curves).
Photons, on the other hand, provide a repulsive force that we call radiation pressure.
In terms of contribution to the energy density of the universe:
Let the critical density $\Omega_c=1$. This is the energy density of flat space, and provides an accurate description of the large-scale universe by current measurements.
$\Omega_m$ is the energy density contribution of barionic matter. It's approximately equal to $0.3$. Of that $0.3$, visible matter contributes about $0.05$.
$\Omega_\Lambda$ is the energy density contribution attributed to the cosmological constant $\Lambda$, and is about $0.7$, or about 70% of the energy in the universe.
You might have noticed that $\Omega_m + \Omega_\Lambda \approx 1 = \Omega_c$. Where's the light/radiation?
$\Omega_r$, the energy density contribution of radiation, is $\approx 0.00001$.