Darkvision states:

> You 
can see in dim light within 60 feet of you as if it were 
bright light, and in darkness as if it were dim light. You 
can’t discern color in darkness, only shades of gray.

It doesn't relies on light to function, as it grants you vision also in total darkness situations. Hinted by Adam's answer, i would say that darkvision has effects like modern active-infrared night vision:

[![enter image description here][1]][1]

This image was shooted using only infrared light. There are light differences and projected shadows, although the general deep perception is not great. 

So yeah, you actually project infrared rays from your eyes. How cool is that xD

On the other side, Devil's Sight states that you can see *normally*. Normally includes colors and everything, so i think it's more a magical ability that relies on a reality-twisting effect like most spells do.

  [1]: https://i.sstatic.net/7r5P1.jpg