If the electric wire is not inside of conduit and is just plain Underground Direct Burial Feeder Wire then it must be buried a minimum of 24 inches which is 2 feet.
If the electric wire is placed into conduit then the conduit only has to be buried 18 inches but the deeper you bury the electric lines the better it will be for safety should someone decide to dig in the area without calling 811.
People do dig in areas without first checking where wires are and although 811 won't be able to locate a residential electric line it's best to be safe and bury it as deep as you can.
But 2 feet is usually sufficient enough and meets code for electric wire buried in residential settings.