I've had the check engine light come on for a bad tank of gas, not tightening the gas cap down enough, clogged PCV valve, and driving up in altitude.

I recently had my EGR and PCV valves replaced and the hoses going to them cleaned out. Since I had this done I have gotten 20 more miles per tank of gas than I did before the clean. Give that a shot. Not too expensive, but well worth it.