Alignment is a fancy word for aim. One of the most important parts of golf is getting the ball to go where you want it to go, and it starts with how you are set up, or aimed.
It’s important to realize that good alignment takes practice, and you can practice it at the the same time that you practice your swing.
If you are fortunate enough to go to a professional tournament, you’ll see most of the players working with alignment sticks on the range to make sure that there is no variance in their setup. But at any time on the local range, you’ll only see a few doing the same. Personally, I’m a firm believer in using alignment sticks every single time you hit balls, whether it be 1 or 100. You need to be aware of your alignment because you need a target to evaluate the accuracy of your swing.
Imagine how silly shooting a basketball without a hoop would be, or a hockey puck without a net. Choosing not to use a visual aid to help with your alignment should strike you as being similarly useless.
“It goes without saying that it is no good having a perfect setup, perfect grip and perfect golf swing if the whole thing is misaligned. It sounds obvious but many players simply do not spend enough time getting themselves on target." - Nick Faldo
It must also be noted that you don’t need special alignment sticks that cost a fortune. Old shafts work, or even clubs that you’re not using. Before you start swinging, make a cross with whatever you choose to use, like this:
The goal is to get that “square” image ingrained into your mental space while standing over the ball. Without proper alignment, your body receives mixed signals from your brain with regards to your body position and your intended target. If your eyes are looking towards the target but your body and club face are actually aligned to the right or left of it, you’ll need to make adjustments in your swing, which affects its plane and path. This could result in a number of problems, any of which will cause the ball to travel off-line.
Another important note to make is that the line on the ground is not limited to helping keep your feet aligned straight. Your hips, knees as well as your shoulders should stay square with that line, as all three need to be in agreement with the feet for the ball to fly straight.
The absolute best way of checking this is to get a partner to get a golf club and lay it parallel with the ground across each part of your body once you've setup to a shot (shoulders, hips, knees).