Hmmm, maybe a faulty power supply? The other thign I can think of is that somewhere you're power is getting grounded and it's shutting itself off, or your power load is excedding your power supply. Either that, or one of your computer parts wasn't assembled properly and the computer is shutting itself down. Make sure your CPU heatsink and fan are properly attached. Along with that, make sure your RAM is installed correctly. Try booting with just one stick in, then with that one stick move along all four or however many slots you have. If that checks out, add the other, try each slot, see what happens.
Also, make sure all your connectors are properly connected. Make sure everything isn't touching anythign that it shouldn't be touching, say a screw fell while you were screwing in something, such as the motherboard or video card, and the screw fell, that could potentially ground the power and thus shut it off.
Just double and triple check everything. It is always better to be safe, then to be sory.