The first photo of the entire Earth from space was nicknamed the "Blue Marble" photo.
It was taken by the crew of Apollo 17 on December 7, 1972. They took it with the sun at their backs as they left earth's orbit on their way to the moon -- they were about 28,000 miles (45,000 km) away from the earth.
Apollo 17 was the last manned mission to the moon. No human beings have been at the proper distance from earth to take a photo of the whole planet since.