Darkness (usually) cancels out all Advantage and Disadvantage effects for people affected
This is because of two basic rules that affect how combat resolves.
For the person outside the Darkness:
- They cannot see the target (even if they know their location, which they do unless the target uses the Hide action), so they have Disadvantage on their Attack Rolls
- Their target cannot see them, so they have Advantage on their Attack Rolls
This is symmetric for the person inside the Darkness as well: they cannot see anyone they attack, and anyone they attack cannot see them either.
The semantics of these rules are found in the Unseen Attackers paragraph of the Making an Attack section of Chapter 9 of the Player's Handbook:
Combatants often try to escape their foes' notice by hiding, casting the invisibility spell, or lurking in darkness.
When you attack a target that you can't see, you have disadvantage on the attack roll. This is true whether you're guessing the target's location or you're targeting a creature you can hear but not see. If the target isn't in the location you targeted, you automatically miss, but the DM typically just says that the attack missed, not whether you guessed the target's location correctly.
When a creature can't see you, you have advantage on attack rolls against it.
If you are hidden—both unseen and unheard—when you make an attack, you give away your location when the attack hits or misses.
Since Advantage and Disadvantage cancel each other, and you don't consider stacked effects (i.e. 2 Advantage sources + 1 Disadvantage source doesn't result in net Advantage), Darkness almost always results in all advantage + disadvantage being negated for all affected creatures.
Shadow Sorcerers, Devil's Sight, and True Sight break this Symmetry
There are three features in 5th edition D&D that alter this situation.
- When Shadow Sorcerers cast the Darkness spell using their own Sorcery Points, they are explicitly permitted to see through their own Darkness spell
- Any creature that has the feature Devil's Sight (most high CR Devils, and Warlocks that take the Devil's Sight Eldritch Invocation) can treat all Darkness, even magical Darkness, as Dim Light (which has no effect on Attack Rolls)
- Any creature that has the feature True Sight (some creatures, as well as anyone who has the Truesight spell cast on them) may ignore Magical Darkness entirely, as though it's not there
In each of these situations, the Unseen Attackers rule comes into play, where the creatures that have at least one of these features will have advantage against any creatures that don't when attacking them, and said target creatures when attacking will have Disadvantage against their better-sighted assailants.
So what's the point?
Well, for starters, it does negate Advantage that your opponents might have. That's one good use.
Secondly, it makes it easy to Hide. Hideing requires some kind of cover, or some ability to stop the enemy from seeing you. So long as that dagger is out, the creature trying to evade the enemy can Hide as an action whenever they want, and if their Dexterity(Stealth) roll is high enough, their location becomes unknown to their enemy (though known to be somewhere inside the Darkness bubble), which will make it much harder to hit them, even without Disadvantage on their attack rolls.
Resolving the unknown location, mechanically, is DM fiat; generally, the DM makes creatures target random points within the bubble, and if they're more than 5' from the creature, they're not close enough to hit them. Otherwise, they use their Action to use the Search action, and if they roll high enough, they're able to know the location of their target
Another important use of Darkness is to prevent spellcasting that requires visible targets. The vast majority of spells, especially single-target spells, require visibility of the target in question; obscuring vision with Darkness makes such spells unusable.