How do I implement Lights-Out game using logic gates or flip flops?
The obvious approach would be to use a processor and do all this in firmware.

However, if I really needed to do this with stone knives and bear skins for some reason, I'd dedicate a toggling flip-flop to each square.  The flip flop of each square would be toggled by the press of its button or either of the four neighboring buttons.  Of course those button presses need to be de-bounced.  Again, this would be easier in firmware.

A hardware solution wouldn't be all that complex, but everything would be replicated 25 times, making it large and tedius to build.

Added:

Apparently the description above is not clear enough.  Here is a diagram of what is in each cell:



The other 4 inputs to the NAND gate are driven from the debounced signals of the 4 surrounding buttons that are also supposed to toggle the state of this square.  Likewise, the debounced signal from this button also goes to one of the NAND gate inputs of each of the 4 surrounding cells.