Minecraft wiki entry for Defense, associated text: Make them at least 3 blocks high
Add an extension around the outside to defend against spiders.
(consider making it out of glass or another clear block so zombies and skeletons cannot use it to take cover from the sun).
Torches should be added to the top or sides of the wall, unless low visibility is desired (for example, to reduce the chance of other players noticing a camouflaged wall on a multiplayer server). Torches will prevent unwanted mobs from spawning near a player's wall, and provide a source of light.
Ditches or moats can be added on the inside or outside of the wall as an extra barrier. Cactus can also damage mobs, so placing it is an effective defense.