When close up to an enemy, melee attacking can be the quickest way of finishing him off. It also saves a bit of ammo, and it just plain feels good, particularly with the plasma pistol's fast right hook. If you take an Elite or Jackal or Grunt by surprise, the blow kills them outright. Normally when you do that, you'd be creeping up on them from behind; but the one-hit kill is also possible from the side if you step out from cover and strike before they've reacted.
If you deliver your blow while moving towards the target, it seems to increase the damage you inflict. Based on some testing against Hunters, I'd estimate the increase as something like 30%. On Legendary a strong Hunter normally takes 13 blows to put down, but if the blows are delivered while moving towards him (e.g. to his back after dodging a swipe then turning to briefly run at him), you can expect to put him down in just 10. In my testing I found no evidence for melee power being dependent on how far you are from the enemy.
As far as I can tell, the damage you inflict with a melee attack is independent of which weapon you're holding; they cause equal damage. However, you'll doubtless have noticed that some weapons let you whack faster than others. The assault rifle and plasma pistol are excellent in this regard and deliver fast crisp blows, while the needler feels slow and clumsy. Actually though, there are two aspects to the matter of speed, as follows.
Firstly there's the response time. How fast does it take for a whack to be delivered once you hit the button? This is hard to measure, but to me it's always felt like the assault rifle and plasma pistol have the shortest response times. That's pretty much what I meant when I said that they delivered crisp blows.
Secondly, what rate of whacking can you manage? This is relevant when you're going to wear down an enemy with multiple blows. The higher the whack-rate, the quicker you'll be able to get the job done. In tests, I managed a rate of around 65 whacks per minute for the plasma pistol, 60 for the assault rifle, plasma rifle, and sniper rifle, 50 for the pistol, and 40 for the needler and rocket launcher. However, to achieve these rates it's no good waiting for each melee animation to completely finish before you press the button again. You need to re-press as early as possible near the end of the latest animation, something which takes a bit of practice.
Avoid death throe blasts
To avoid being peppered by random shots from a collapsing enemy's weapon, particularly the damaging blasts from an Elite's plasma rifle, administer the final blow standing to one side or behind, rather than in front.
If you're whacking an Elite, you can help confuse him by circling around as you rain in the blows. He won't know whether he's coming or going. If needed, you can stun him with a plasma ball to give you enough time to rush in for the first whack.
Bop that ugly beak-face
Whacking is also a great way to finish off a Jackal after taking down his shield with a plasma ball as you rush in. Sometimes it needs a second whack, but hey, that's just double the pleasure, right?