I want to buy a WiFi wall switch for my lights outside to turn on without me but my house has no ground and the WiFi wall switch requires one and I noticed this can somebody explain the wiring?
No, it is not safe. That screw terminal is made to take just one wire. Since it doesn't use the switch as it's intended (by its UL listing) it's a code violation. It will make a poor connection, which can heat up and potentially cause a fire.
As long as there's room in the box, it can be corrected by pigtailing. You would connect one end of a new short section of wire (the "pigtail") to the terminal screw, and splice the two wires on the screw and the other end of the pigtail.
Very basic task for an electrician, doable for a DIY that knows the basics of working safely with electrical.
Three potential issues:
Double-wire on Screw -> Pigtail
As already answered, you should switch the double-wire on one screw to a single wire using a pigtail. That's the easy part...
It looks like the switch is in a metal box. If so, then the box may be grounded via metal conduit and be a valid grounding point for your new switch. You need to check that to be sure. Even if it is a metal box and metal conduit at the box, there is still a possibility that somewhere along the way to the breaker the ground path is broken.
It is very likely that your WiFi switch needs a neutral in the box for power. The ground is for safety, the neutral (together with the hot) actually powers the switch. Older simple switches will often not have a neutral in the box. The wires going in & out of the switch hot & switched hot (if I have the terminology correct) but not hot & neutral (as is the case with an ordinary outlet). Because older switches didn't need a neutral, it is not always present inside the box. If it is present and split & wire-nut capped then you can pigtail to the switch. If it is present as a continuous wire and has enough slack to work with then you can cut it and wire-nut a pigtail to the switch. If it is not there then you have a problem.