Try all methods suggested below one by one and try if any of the solution works.
1) If you are using a USB keyboard, Use a PS/2 keyboard and check if keyboard works. Try to enter BIOS and load fail safe defaults. Press F10 to save and exit.
2) Check the Ram Modules. If you have two of them, try with one by one.
3) Make sure the inside of the cpu case is clean / dust free. If not, use air blower to blow out dust (Do NOT use a vacuum cleaner).
Most importantly the RAM slots and the Fan over CPU should be free of dust. Use something like unused new paint brush to clean RAM slot.
4) Check CMOS battery. If you have a voltmeter / multimeter, check the voltage of the CMOS battery, should read 3v or more than 3volts.
5) Remove all addon cards and check with only RAM and CPU/ Heatsink.
6) Check for any blown capacitors on the motherboard. Example:
http://archive.siliconchip.com.au/static/images/articles/i303/30328_4lo.jpg The red arrows shows blown / leaked capacitors. The first three capacitors from left shows good / normal capacitors.
7) Try with another PSU / SMPS.