Not all reptiles lay eggs, but those that do typically choose loose earth or sand in order to lay their clutch of eggs. For reptiles that have limbs, a nest is generally built, even if it's just a hole in the ground that the female has scratched out. Snakes cannot make nests or dig, but they usually look for dips in the ground to lay their eggs in.
Egg-laying reptiles tend to live in the warmer continents and bodies of water below the equator. If they can travel, such as sea turtles, then they will purposefully travel to beaches in warmer climates to lay their eggs. There needs to be a certain amount of warmth for the eggs to incubate. Only about 70 percent of snakes lay eggs. The other 30 percent give birth to live baby snakes. Most of them live in northern climates, like the Eastern garter snake, but there are exceptions, such as the Anaconda, that lives in South America.
If these places aren't available for gravid (egg-laden) reptiles to lay their eggs, they often won't bother breeding or will just deposit the eggs anywhere for them to die. Loss of habitat to make nests or to deposit in warm earth like clean beaches or riverbanks can lead to the decline in egg laying reptile species like turtles, snakes, lizards and crocodilians.
Soft, leathery reptile eggs are not as tough as bird eggs and so the embryos inside are more prone to dying than in bird eggs. In order for reptile eggs to successfully hatch, the eggs need to be undisturbed as possible in some sort of incubator -- whether an artificial incubator or a natural nest. Reptile eggs aren't to be turned like bird eggs because this could injure or kill the embryo inside.
Some endangered species, such as the leatherback turtle, need artificial incubation of eggs in order to help their species survive. After the females come ashore, dig a nest and lay their eggs, and then the eggs are taken by scientists and conservationists to artificial incubators until a day or so before they are due to hatch. They are then returned to the nest and supervised until all of the hatchlings go into the ocean. This is just one part of helping a species come back from the brink. Preserving their hatching grounds is another.
Knowing about where reptiles lay their eggs in the wild can help zoos, aquariums and pet reptile owners replicate the wild conditions in order to help encourage the reptiles to breed and for the eggs to successfully hatch.