Instructions
Build a wall around your home. A tall wall is the simplest defense tool available, as it simply prevents monsters from coming near your home. Walls need to be at least three blocks high, as spiders can jump anything smaller.
Surround your home with torches, and add torches to any perimeter structures. Monsters cannot spawn in the light of torches.
Use the environment to your advantage. Digging a moat of water (or lava), for example, will help keep enemies at a safe distance. Ditches should have at least a three-block height with an overhang to prevent climbing.
Create ̶0;murder holes.̶1; Dig holes around your home that are at least four blocks deep, then place a cactus, lava, or some burning Netherrack at the bottom. If enemies fall into the hole, they will be stuck taking damage until they die.
Build Snow Golems. A combination of snowballs and pumpkins, Snow Golems will stand watch around your home and throw snowballs at would-be attackers.
Upgrade your walls to obsidian if you can. It's difficult to work with due to it only being produced by cooled lava, but it is the toughest common substance in all of "Minecraft."
Combine defenses to build a safer home. The best defensive perimeters are the ones that combine several effective components in layers.
Build your home in tough-to-reach places. A floating island home, while difficult to access, is very hard for enemies to enter. The same can be said for homes near the top of mountains, or homes with hidden underwater entrances.