Minecraft wiki entry for Beginner%27s_guide, associated text: Don't be too ambitious the first night, because you want to be safe before dark, and you also want to light up the space you claim (see "Light" below). You can always expand and decorate your home later, or even rearrange the landscape around it.
When picking your location, it's good to have a view of the landscape so you can see if any monsters are waiting for you in the morning. You might need to leave your shelter at a sprint to escape a pesky creeper. Similarly, don't set up next to a pond where skeletons might take refuge in the morning.
Learn about the awesome powers of wood! Fences can be used not only in the obvious way but as windows or transparent walls, with fence gates to get in and out. Doors provide a full-height exit for solid walls: logs, planks, stone, even dirt, but not fences! A few properly-placed ladders can make it a lot easier to get up to your roof or up a hill. A chest is also useful – stash anything you're not going to use soon, so you don't have to worry about it if you happen to get killed. You save some of your precious 36 inventory slots by making planks and sticks only as you need them. Even if you don't have a chance to do anything fancy before nightfall, you can spend part of the night exploring the Recipe Book for your crafting table and furnace.
If you can manage to make a bed early on, place that in your shelter and use it the first night you have it. Getting killed is much less painful after that because sleeping in a bed sets the spawn point next to it, so you reappear inside your home rather than somewhere out in the wild. After the first night, you may well want to spend the nights crafting and mining. Phantoms are not an immediate concern, but you really do want that bed by at least your third night, or simply don't venture out at night until you have a bed.