what part of an illusion spell qualifies as an enemy of the target?
The target of the silent image is a space, not a creature. Everyone sees it and has to determine what to make of it. If you create an image of creature or person, your enemy might believe that the image is his enemy, or (depending on the image) his friend.
You can make it appear to attack anyone you want, but the second it interacts with anything real the real things pass right through exposing the image as an illusion. It can't really attack, so it can't flank (flanking not being a real thing in 5e, I mean that it doesn't count for abilities or rules like the rogue's sneak attack -- "if another enemy is in 5 feet").
It can provide cover providing disadvantage on attacks the monster makes, if you makes something you can hide behind. It might cause a distraction that may be ruled by a DM as providing advantage on attacks against the monster.
The your enemy might target the illusion with an attack or spell, thinking it is a real threat. How certain spells interact with it would be up to your DM (like if your enemy tried to banish it does he lose his spell slot for the attempt or does not complete the spell when the touch passes through the image?).
Your enemy might burn its action investigating to see if the 15 foot tall whatever that suddenly burst into existence in front of it is a real threat or a trick of some kind. Your enemy might flee because it doesn't want to face the apparent dragon that is now staring it down...
The illusion isn't really an enemy,
It cannot provide flanking (read note above),
It can be the target of spells and attacks,
It might be able to provide cover,
It might be able to provide distraction
Phantasmal Force
The illusion in this spell is still an illusion. It is still not an enemy, RAW. It can appear to be create, and that creature can attack causing psychic damage.
A phantasm created to appear as a creature can attack the target. ...
Each round on your turn, the phantasm can deal 1d6 psychic damage
Rules as written, there is nothing that grants this any extra consideration as an enemy as far as things like sneak attack are concerned. Some DMs would likely grant it, but that would be house rule to talk through with the DM.