In order to automatically convert the transparent areas of a layer into a mask, select Layer > Layer Mask > From Transparency.