My Sony VAIO laptop starts up, takes me to my password screen, but makes this odd buzzing noise. After I sign in, it takes me to my desktop screen but then shuts down without any warning. Its a Sony VAIO t-series ultrabook with an i5 processor. I have had this laptop for about 5 years now.
A very likely thing is that the motherboard is bad. Not a lot of things you can try on that, try different RAM, see if it turns on or at least makes some error beeps if the RAM and drive are removed. Can try to remove the CMOS battery, the main battery and hold in the power button for about 30 seconds, then plug in wall power without the batteries and see if it turns on.