Is it possible to enable "double tap to wake" on android devices which do not support it? I am an amateur android fan with abit of shallow knowledge about android and I have always had this query about whether or not it is possible to sort of enable or integrate this feature(dd2w) into my older rooted android phone ? What does it depend on or what does it take to enable it? What is the science behind it? Btw, I'm running the regular android rom.

Ps: it would be really nice if your answer would explain things simply for me to understand. Thanks in advance :D
On some devices yes... but it requires kernel support, meaning you need a custom kernel. There are several known methods of enabling it with a custom kernel and it depends on the screen type, SoC, and other factors, but in most cases it causes an additional 2-3% battery drain per hour to support DT2W or S2W because the digitizer needs to be powered all the time and the device wasn't designed for that. 

Actually implementing it is more of a development question than an Android question though, it requires manipulation of the kernel code and building a new boot image and flashing it.