In addition to all the other answers, which cover the big details, there is another key difference.
Advantage and disadvantage to attacks do not always even each other out, there can be situations where the advantage/disadvantage tradeoff is useful even without an ability to see through darkness.
The big benefit comes from placing your target in darkness but not yourself. Your target is blinded no matter what, You are effectively 'blinded' if you attack your enemy in the darkness as well, but your enemy has disadvantage when attacking you through the darkness and if you attack him with a long range attack your disadvantage even's out with his advantage to give you a net gain.
Thus any situation where your enemy has long range attacks you can benefit from casting darkness on where they stand. In the best case scenario, where they can't move out of the darkness, you now have forced disadvantage on every range attack they do for the entire fight. Worse case scenario you force everyone in the darkness to spend an action to move out of the darkness wasting actions.
So some situations in which it's useful to put your enemy in darkness:
Ranged attackers that you can't reach
Imagine fighting in a courtyard with enemy archers attacking form some overhead wall. Casting darkness on them would work wonders, it wouldn't affect you but they would either have to spend several rounds moving down to the courtyard, and closer to you, or put up with constant disadvantage.
You are retreating
You won't make any attack rolls, you just want to survive the volley of arrows/spells until you make it to safety
To protect vulnerable people at a critical moment
Maybe one or more of your party members just sustained some major injury and is near death. You're enemy goes next and is going to try to finish them off. If you have no other option a darkness spell can increase the odds that your team survives the next attack so it can heal/regroup.
Alternatively maybe the enemy is attacking civilians or your on an escort quest or simply is smart enough to all focus their ranged attacks at one vulnerable ally who's doing something plot critical. The situation is all the same, at the moment you want those people safe.
Total defense has its uses
Any situation in which a total defense action would make sense, darkness would as well. Since total defense would not be an attack roll, it means you get high defense and your enemy disadvantage giving you a very good chance of negating every attack.
Imagine a situation where your fighting or doing something else important in a particular room, and know that a large number of slightly lower reinforcements will be summoned when you do that could easily overwhelm your team before your done. You have your Warrior stand in front of the door, making total defense actions, and cast darkness so it covers just the doorway. Now instead of fighting a large force that could easily defeat you your highest defense teammate with a total defense boost and advantage on defense has to guard against the attack of only one foe that can fit in the doorway, and the enemy may already be just low enough to have a lower attack. Your warriors defense is already higher then enemies attack and disadvantage favors whoever has the statistical advantage so your warrior can pretty much stall those reinforcements indefinitely buying you a long time to do whatever you need to do.
You need to prevent them from accomplishing a skill check that requires sight
Your enemy is about to read the ancient runes of evil to summon the demon from beyond and you just need a few more rounds to stop him, cast darkness on those runes and you have that time. Lots of skill checks have to happen at a specific place and blinding that area keeps your enemy from doing whatever they intended to do there.
Uses beyond RAW tactics
There are plenty of uses for darkness that aren't explicitly spelled out in RAW but which any GM is likely to allow. For example it increases stealth and ability to sneak around, though another answer already mentioned that.
You could use it to spook or scare someone. Or to obscure your face when negotiating with someone whom you don't wish to know your identity, or to prevent someone from making some sort of check that requires eyesight that it's imperative he fails to make at this moment, etc. There are a million role-playing uses for various situations.