Microcontroller is considered as the backbone of Embedded System& it's most important feature is: "It can think". A Microcontroller looks like a simple electronics chip, but in actual its too powerful (also called Embedded Computer) because its programmable. Using programming code, we can control all I/O pins of a micontroller and can perform multiple functions. Before microcontrollers, DLD gates were used to create logics i.e. adding delays, turning signals ON/OFF etc. DLD is still in practice for small projects but if you are working on big industrial projects, then DLD circuits become too messy & thus too difficult to handle. In below figure, I have added two circuits of traffic signal lights:
Left Circuit: 555 Timer is used for creating the LED sequences.
Right Circuit: Microcontroller is used for controlling LEDs.