The effect of neem oil as a pesticide is in reproduction. It blocks pests by messing with their reproductive cycle. This is a blurb out of wiki:
Formulations made of neem oil also find wide usage as a bio-pesticide for organic farming, as it repels a wide variety of pests including the mealy bug, beet armyworm, aphids, the cabbage worm, thrips, whiteflies, mites, fungus gnats, beetles, moth larvae, mushroom flies, leafminers, caterpillars, locust, nematodes and the Japanese beetle. Neem oil is not known to be harmful to mammals, birds, earthworms or some beneficial insects such as butterflies, honeybees and ladybugs. It can be used as a household pesticide for ant, bedbug, cockroach, housefly, sand fly, snail, termite and mosquitoes both as repellent and larvicide (Puri 1999). Neem oil also controls black spot, powdery mildew, anthracnose and rust (fungus).