Although amphibious frogs live on land and in water, they must lay their eggs in water or the eggs will dry up, effectively killing the offspring inside. Frog eggs are covered with a glycoprotein, which helps keep the eggs moist. This glycoprotein has to keep in contact with a source of moisture, such as water.
Another reason why frogs have to lay their eggs in water is because once the eggs hatch, the tadpoles inside need to live in water during the first phase of their lives. This is because tadpoles have gills that require them to swim underwater to breath. If a tadpole is hatched on land, it is unable to breath and eventually dies.
Unlike bird eggs, frog eggs are very soft. As a result, they need extra cushioning that the water provides to better protect the tadpoles inside.
According to LiveScience, there is one frog that has the ability to lay eggs both on land and in water. It is called the yellow Panamanian amphibian frog. Instead of laying eggs in ponds like traditional frogs, this frog tends to lay its eggs on plants that are hanging over sources of water. Once the eggs hatch, the tadpoles simply fall into the water source below.