Many landscape lights come with an attached plastic spike so you could install them in the ground.
But not all ground is soft enough to easily drive these spikes.
Using an auger bit you could drill out a hole to hold your lights.
Caliche and impacted dirt of any bang out will hinder the installation of these lights.
A landscape lighting spike needs to sit about 5-8 inches below the surface of the ground.
This depth will be enough to hold the light securely and keep it from tilting and falling out.
Install Landscape Lighting Into Caliche| Charles & Hudson