There are national and local requirements you must obey if you plan to do any wiring work in your home. Outdoor wiring uses a specific type of wire, and it must be burried according to national and local standards. You should always do your work to code for safety reasons and to ensure you pass any inspections down the road. The National Electrical Code (NEC) sets the standards.
A depth of only 6 inches is required for cable buried in rigid metallic conduit. This pipe is either steel or aluminium. It's best to paint aluminium conduit with a bituminous paint to combat corrosion. All must run through rigid metallic conduit where it emerges from the trench.
Rigid non-metallic (NM) electrical conduit is generally made from either polyvinyl chloride (PVC) or high-density polythene. PVC is for use above ground while the polythene can be used in a trench. The NEC requires a depth of 12 inches for non-metallic conduit.
Underground feeder (UF) cable is encased in weatherproof sheathing and can be directly buried in a trench. The sheath on such a cable is clearly marked as UF and the colours can vary. Because there is no conduit, the depth requirement increases to 18 inches.
The NEC is not law. It is a set of standardised guidelines that are adopted as law, often unchanged, at the local level either by the county or municipality. Some areas have more rigid requirements.