No, but it can provide obscurement.
Cover requires a solid object. Examples from the definition:
Walls, trees, creatures, and other obstacles can provide cover during combat, making a target more difficult to harm.
The game mechanic that represents the sight-blocking effect of something like an illusion is obscurement.
A heavily obscured area--such as darkness, opaque fog, or dense foliage--blocks vision entirely. A creature effectively suffers from the blinded condition when trying to see something in that area.
Note that the main effect of the blinded condition is disadvantage on attack rolls, not a change in the target's AC.
What if the attacker knows it's an illusion?
Minor illusion, silent image, and major image all specify that a creature that discerns that it's an illusion can see through it. If it's an illusion of, say, a wooden fence, this will happen the first time an attack hits the illusion. On the other hand, if it's an illusion of something like dense fog, an arrow or other object passing through it is perfectly normal. A creature can always spend a turn examining the illusion to make an Investigation check to see that it's not natural, but it's basically impossible not to metagame that.
Even after the enemy discerns the illusion, it is still there being a distraction. I'd downgrade it to "lightly obscured", which just imposes disadvantage on Perception checks in the area, but that's a judgment call.