Can the illusory object block light? And if not, what would a creature see? ...Could a wizard create an illusory box around a torch to "turn off the lights"?
The spell creates an image. If the image can't block light, then it would be transparent, or at least translucent, which would severely limit the utility to the point of near uselessness. Certainly an object that light passes through when it shouldn't normally, such as a stone wall, would raise suspicion and give the illusion away. So we have to posit that the image can block your view of things behind it, including light sources, if you're fooled.
The spell description says (PHB, p. 260):
"If a creature discerns the illusion for what it is, the illusion becomes faint to the creature."
implying that the image appears solid otherwise. Creatures who haven't figured out that it is an illusion should see the image as though it were the intended object, with all of its requisite visual properties. So I would expect that someone fooled by the spell would be tricked by the magic into thinking the light was blocked and would "see" the environment in whatever reduced lighting conditions this caused.
I also expect there will be clues presented in such a scenario that warrant allowing creatures to make an investigation check. If the object suddenly appears, or a light is suddenly dowsed, a creature would be likely to investigate the event more closely, especially given that their senses are actually contesting the magic whether they fully realize it or not.
For example, could a vampire mage use the Minor Illusion cantrip to
protect himself from the light of a sun blade?
As for a vampire protecting themselves from a source of sunlight using this cantrip, clearly the vampire "...discerns the illusion for what it is..." which should negate its effectiveness in shielding him from the light source.
Indeed, I would probably rule that even if a vampire believed the illusion was shading them (say someone else cast it for them), it's actually not, so they'd take damage and probably figure out right away that something was not as it seemed. I consider this to be the same case as trying to shield someone from a ray-based spell attack using this cantrip. The ray isn't fooled, and neither is your body when the ray hits you.
That said, the spell could block someone's line of sight, and if they couldn't see through it, they may not be able to see their intended target. So you could use the spell to block an opening, like an arrow slit, to potentially prevent yourself from being targeted by a wizard casting through the slit.