There are several different explanations for this. The simplest would be that Andy is becoming increasingly deranged. With his mother dead and him partially responsible for it, his corruption at his work threatening to be exposed, and Gina's confession about cheating on him, he has lost a lot that he cares about in a short time. His controlled outburst of anger after Gina leaves him (swiping the table and the bed) is one of the more explicit indications that he is losing his mental stability. All that remains now is his freedom, so in order to avoid jail time and flee the country, he decides to rob his dealer for money and get rid of all loose ends, which means killing anyone that might implicate him in his crimes. In his agitated and paranoid state, he may simply think that the unconscious man could have heard or seen someone, and he therefore takes no risks and executes him too, leaving no witnesses. He does the exact same with Dex (Bobby's brother-in-law), and would probably have done the same to Hank and Bobby's wife, had the latter not intervened.
Another possibility is that Andy kills the unconscious man because he is in love with the dealer. This is hinted at in several scenes where Andy seeks personal comfort/solace in the dealer's company only to be emotionally shunned. Andy is not capable of opening up to his wife and has clearly developed some kind of unreciprocated emotional relationship with the dealer (who regularly rejects Andy's attempts at intimate conversation). When Andy sees the over-weight, semi-naked man (who looks very much like Andy) on the bed he is confronted by the fact that he is just one of many men the dealer has 'appointments' with. This, on top of everything else that is going on, pushes him over the edge. He murders the man followed shortly by the dealer (who Andy had initially been content to simply beat into submission).
A third explanation is Andy basically saw a mirror of himself in the unconscious man. On the outside, Andy appears as a man of great self-assurance and determination. Only during his drug-induced deliriums is Andy able to expose his insecurities and admit that his life is a failure. Outside of those moments, he seems perfectly able to hide those sentiments (except for his one emotional outburst to Gina in the car). Seeing the other man lying there, getting high on heroin, may instantly remind Andy that he is a mere junky with a miserable life, so shooting this man is his way of expressing his hatred for himself.