Why sugar butter cocopowder mixture got hard in double boiler
When I hear the method, I don't see a way it could work as described. 

Suger will neither dissolve in the melted butter, nor will it melt at low temperatures - and the water bath keeps them from getting high enough. I don't see what the double boiler is supposed to do, maybe prevent the butter from browning. But when using this procedure, there is no reason for the sugar to do anything but stay hard. Even if you were to use powdered sugar, it will give a grainy texture to the mixture. 

I was going to tell you to just ditch the recipe for being impossible to work, but on a second thought, I started wondering why you want the sugar to melt in the first place. Upon looking around for brownie recipes with cocoa powder, they do start with melted butter, sometimes even mentioning a double boiler, but none of them had directions to wait until the sugar is melted. Others just skipped the double boiler step and directed to mix the sugar and cocoa powder with the already-melted butter. So your recipe is only bad in the sense of telling you for waiting for the sugar to melt. If you prefer to keep using it, simply wait until the butter in the mixture is melted (with a double boiler or without, as you wish - just don't brown the butter) and keep going with the sugar as hard as-is.