If you are building a wood fence anew, this is the easiest way to install a mechanism that locks from both sides. Using a hybrid wood and metal construction is the strongest method, as you have the beauty of the wood undergirded with a solid metal foundation custom built to hold the locking hardware. Attach hardware that is very similar to what you use inside the home--locks that will either lock from either side with a key or a bolt that can be released from the interior. Virtually any kind of security bolt can be installed provided you plan ahead with regard to the threshold design.
Retrofit Existing Fence
This job can be tougher, as there are more variables. If you have a slat fence, or similar thinner construction, the transition to the gate fixture could be more difficult unless you are willing to use a wider gate assembly. If you are using wood posts at the threshold, consider changing to a metal construction to accommodate prefabricated locking mechanisms. In addition to easing the retrofit, you will get a more secure lock, as the wood is more susceptible to rot and wear. Consider replacing the door with a metal and wood combination. The advantages here are that you retain the beauty of the wood but get the benefits of the metal. The new gate will operate more reliably and lock more securely than its wood counterpart. Look for a gate and door product that is prefabricated and that will fit into your existing set-up. If aesthetic concerns are at the top of your list, stay with the wood, but have the gate expanded to double thickness to help when you go shopping for a cylinder for the lock. Also, if the threshold remains wood, a bolt-type lock gives a more positive latch.