Why does the Mars 24.5 hr day versus the Moons 28 day-day matter? What are the consequences of this big difference between Earth day and the moon/Mars day?
On the moon it means you need enough solar power in batteries to power your gear, and to power appropriate spectrum lighting for plant growth.
If you can rely on solar power more reliably, then you can construct (significantly more complex than those required on earth) green houses which still benefit from natural light.
I actually agree that there are numerous challenges associated with very long days and nights. Artificial lighting per se is not among them. Solar power is a reasonable one.