Air molecules more efficiently scatter increasingly blue light, making the clear day sky blue for ground observers, and the horizon blue for astronauts.
Besides reflecting sunlight, these atmospheric molecules also deflect moonlight, making the lower part of the moon appear to fade away.
As one looks higher in the photograph, the increasingly thin atmosphere appears to fade to black.