If you are using an older version of PS (prior to CC2015), here's an easy workaround, wihtout the need to install external scripts:
Do the following steps and save them as an action. Optionally bind it to an F-key for a faster workflow:
Select the layers you want to export
Right-click and select Duplicate layers...
Under Destination set New as the Document
Click OK
Switch to the new document
In the menu, navigate to Image > Trim
Select Transparent Pixels and everything under Trim away
Click OK
-- end action recording here, name it 'Copy to new and trim' and assign an F-key (e.g. F2)
- Navigate to File > Save for Web or use CTRL+SHIFT+ALT+S and save as a PNG.
Next time, all you have to do is:
Select the layers
Hit F2
Hit CTRL+SHIFT+ALT+S