Ovinomancer
No flips for you!
Thanks for the question.
It doesn't take a darkness spell to shut down the only light in a room. Minor Illusion could put a box around it until it was proven to be an illusion, but other cantrips can do it more effectively. Prestidigitation will snuff out a flame, as will Control Flames. Anyone can "extinguish a small flame" as part of interacting with objects (PHB p190) too without the use of magic.
If the question involved an object that had the light cantrip cast on it, the light cantrip says "Completely covering the object with something opaque blocks the light." Illusions are opaque until discovered.
Strong disagree.
Illusions cannot block anything (unless specifically noted). They have no physical reality. The notion that an illusion is enough present to block light but nothing else is special pleading.
Putting an illusionary box over a light cantrip my disguise easy identification of the source, but won't stop the light from illuminating 40' of the area.
My general rule of thumb us that an illusion can add to a scene, but cannot subtract ir otherwise alter it. This prevents oddities like illusions throwing a room into darkness because the light sorce has an image of a box around it. There's already a spell for that.
As a house rule, I've also tossed the whole "if you save you see through it as if it's not there" crud to avoid cheap illusionary one- way mirror tricks. You can recognize the illusion, but you still see it. Still makes illusion excellently useful and flavorful but cuts down on cheese uses that aren't that fun.