Flashing lights usually mean something.
Make a note of the pattern, they normally repeat giving a specific pattern for specific faults. It can give you something concrete to search for in Apple's manuals & Mac repair sites.
Remove all peripherals & retry booting.
You can do all the regular resets & try booting from some other media (an OS installer disk or a backup etc)…
How to Reset NVRAM on your Mac - Apple Support
Using Apple Hardware Test - Apple Support
Resetting the System Management Controller (SMC) on your Mac - Apple Support
Assuming you can boot in some way…
Try safe mode if your Mac doesn't finish starting up - Apple Support
Limited graphics performance in OS X recovery or safe mode - Apple Support
http://www.kelleycomputing.net/rember/ (3rd party RAM test).
The Mac may also have diagnostic LED's inside, see if any are lit up when it fails to startup. You may need a bright light to see what text is printed next to the LED's (if any is visible).
I'd also leave it rest with no power connected overnight, it may reset any components that are failing/ faulty. Removing the PRAM battery will cause the PRAM to reset if left without power.
Also don't forget to check the PRAM battery voltage (or change it if is old). Clean out any dust bunnies if you are familiar with working on computers.
Double check the RAM too, it can be easy to remove & replace it incorrectly when a computer is non-booting. Perhaps try 1/2 the modules as a test.