Depends on the quality of the safe and what you plan to store in it. I mounted mine to the floor as I have a concrete floor and lag bolted it down. I needed a taller one to keep my rifles and such safe and protected. Putting one in the ground is OK but a lot of work. Just depends really on what you want to put in it, Most better safes are so heavy that most burglars couldn't move it no matter where you put it.
The biggest problem with a wall safe is if someone has the time to rip it from the wall and take it with them whereas a floor safe is way more secure in many ways from fire and floods too so personally if I had the choice I'd go with the floor safe here
I have a floor safe. It was a pain in the neck to install but I feel it's much more secure and safer from fire than a wall safe.