NASA's Suomi NPP satellite was able to grab this beautiful image of the United States of America at night because of a new infrared sensor on the satellite. The sensor is able to detect natural light versus man-made light at extremely high resolution. That's how you get this perfect image of Earth at night.
What's interesting is that the pictures from the Suomi satellite are available to the public, giving most people the clearest look of Earth at night ever. Before, the Air Forced had nighttime sattelites in play but most of the data was classified and not nearly as clear as the image above. To see more angles that the Suomi satellite was able to take, check it out here