Just like a pair of tires on your car, sewing machine needles wear out with use. Needles can break, bend, and burr, all of which can effect the quality of your stitching, and permanently damage your sewing machine.
So how often should you change your sewing machine needle? Well, whenever it is damaged, or every 6-8 hours of continuous sewing. Continuous sewing is a hard one for me. I sew at least that much a week, but I am usually working on multiple projects, and switching between different types of needles. At times I'll slip a new needle into my sewing machine, and then pop it out after sewing a seam or two. The needle is still perfectly good, and doesn't need to be discarded. Try to keep track of how much use a particular needle has had. You may want to store used needles in a separate needle case.
Make sure that you take the time before you start a new sewing project to examine your needles to ensure that they aren't burred or bent.
Also, don't force a sewing project through your sewing machine. Forcing material or seams can cause unseen damage to your machine's needle, which in turn will damage your machine. Removing pins as you come to them can also prevent needles from bending and breaking.
You will likely be able to tell if your needle is damaged or dull, just by how your sewing machine sounds. It may not run as smoothly, or if your thread continues to break or snag, it's a sign that your needle may need to be switched out.
Here are a few helpful resources related to sewing machine needles:
How to Change a Sewing Machine Needle
Let the Feed Dog Do The Work
Checking for Needle Burrs