Melatonin is a hormone that helps control wake and sleep cycles in your body. It is well established that short wavelength (“blue” light) suppresses the most melatonin. This type of light is emitted by devices such as smartphones, monitors and TVs. In order to display “white” light, these electronic devices need to emit light at short wavelengths. This “white” light is very close to the maximum sensitivity causing melatonin suppression. What this means is by looking at your electronics, you are reducing the duration of your sleep and also disrupting it. Here is an excellent article with more details.
One solution is to use a program like f.lux which makes the color of your electronic device display adapt to the time of day: warm at night and like sunlight during the day. It is available for Windows, Mac, Linux, and iPhone/iPad (unfortunately only if jailbroken). Another option is to use amber lenses after the sun has gone down. Amber lenses help block blue light.