Put on a dust mask to protect you from inhaling the dust of diatomaceous earth, which may cause respiratory problems. Follow this precaution for any other substance you may add to the soil as well.
Wear gloves, long pants and a long-sleeve shirt. Diatomaceous earth, as well as soaps, peppers and other substances, can cause skin dryness, which can lead to skin irritation.
Put your diatomaceous earth into a bulb duster, if you're applying it to the soil dry. For a neem and soap solution, put 1/2 ounce neem oil, 1/2 teaspoon organic liquid soap and 2 quarts warm water in the bottle. For a pepper solution, add 1 teaspoon of cayenne pepper, 10 drops of citrus essential oil and 1 cup of water to the bottle.
Hold the leaves of any plants away as you squeeze the bulb duster around the perimeter of each plant. Blow enough dust to leave a 1- to 2-inch whitish strip around the plants. Also blow a 1- to 2-inch strip around the perimeter of the garden. If you're using a spray, spray the surface of the soil with your mixture, entirely coating the soil -- and the leaves of the plants -- with enough spray to make the surfaces slightly wet.
Repeat the application of diatomaceous earth after it rains, or after you've watered the garden, since it stops working when the diatomaceous earth gets wet. For this reason, an underground irrigation system would be ideal. That's also why it's not ideal to mix the diatomaceous earth into the soil, since it will get wet. For sprays, re-apply the spray to the soil and plants roughly every two weeks.