Put on your protective clothing --- a long-sleeved shirt and long pants --- as well as safety goggles and a breathing mask.
Cover any adjacent surfaces with drop cloths, as well as the back of the fence, to protect from overspray.
Read the manual of your paint sprayer carefully and prepare the sprayer as directed, filling the liquid compartment with your chosen wood stain. If you want to test the sprayer before spraying the fence, do so on a piece of scrap wood.
Hold the nozzle of the sprayer approximately 12 inches from the fence and turn the sprayer on at a medium to low setting. Guide the sprayer slowly down the fence, one section at a time.
Continue spraying, wiping off any excess stain with rags if necessary. If you need to take a break, make it a quick one --- no more than 15 minutes --- so the stain doesn't begin to settle in the sprayer.
Apply a second coat if necessary, and then repeat on the other side of the fence. Move the drop cloths as necessary.
Clean the sprayer thoroughly once you're finished to remove all traces of the wood stain.