regular wall switch on off led dimmer
There are lots of different ways to do this, and once you get the basic functionality, the rest that Philips does with it is almost free, which is probably why they did.



Looking at hardware, you'll probably end up with:


Some kind of microcontroller (uC), which has it own requirements of:


A compiler or assembler, depending on what programming language you like.
A programmer.
Some way to test incremental parts of the software.
Knowledge of how to use all of these tools.

Some kind of power supply that is uC-friendly.


Read the uC's datasheet to see what it needs.
This will most likely be designed specifically as part of the overall project.  It could be bought off-the-shelf, but probably not.

Some way to amplify the uC's output signals, that are controlled by your software, into what your chosen light emitting device requires.


More circuit-design, yay!

Some way to keep muggles' fingers away from live electrical stuff, including yours when you're not paying attention.


Each of these points is easily worth its own separate question.



Looking at software, you'll have:


Some non-volatile memory that stores either the previous setting or the next one.


You typically get at least a few bytes of this with most uC's in the form of either EEPROM or self-programmable code space.  In case of the latter, just be sure to not clobber the program!

A startup routine that sets up the uC for the normal-running code and manages that non-volatile memory.
Some normal-running code that does whatever it needs to convert the chosen setting into your desired effect.


There are at least two separate questions involved with that; probably more.



Given that this almost certainly requires software, and that software is easily changed to fix bugs and add features, it's no wonder that we see so many features in what would otherwise appear to be a "simple" device.