Fasting for a certain length of time before a blood test is one way of ensuring that your test results are not contaminated by the food you've eaten. The Mayo Clinic notes that fasting may not be necessary to get an accurate reading on a cholesterol test, but most doctors will still ask that you fast for at least 12 hours before your appointment.
For certain other kinds of tests, such as a blood glucose test, fasting is necessary. This test is done to check for diabetes, and it requires that you abstain from any food intake for at least eight hours before the blood is drawn. There are alternatives to this test for diagnosing diabetes, but according to howstuffworks.com, the blood glucose test is easy, fast, and inexpensive.
Other types of blood tests do not require that you fast prior to the blood draw. The test for thyroid hormone in the blood, for example, almost never requires that you fast. But even here, there's an exception. About.com recommends fasting before a thyroid test if you are taking a time-released T3 medication such as Cytomel. In this case, your doctor might ask you to fast before your blood is drawn.