Hitchhiker food can consist of crackers, granola bars, greens, peanut butter, etc.; anything that will give you energy, while at the same time being small, readily available, and not too prone to being smashed in your pack (such as potato chips).
If your budget is not so tight you will probably eat a lot at gas stations. Some of them can pleasantly surprise you, for example some gas stations in Finland that serve fries and self-service salad for only 2 euros. Avoid gas stations in France at all costs, unless you consider 3-4 euros a good deal for a bag of chips and a 33ml carton of orange juice. In Poland, fast food like hot dog can cost only about 3 PLN (1 EUR = 4.20 PLN as of 2013).
Free food is plentiful in much of Europe. Try sandwich shops, bakeries, patisseries and other places like that around closing time. Often you get enough bocadillos to last for a few days! Also check Dumpster Dive and Trashwiki for more detailed info.
In the United States a tremendous amount of food can be recovered from dumpsters - just about any type of food that's sold will eventually show up in the trash. Grocery stores are the best, with large amounts of clean, fresh produce that's just ripe for eating but too ripe to sell, among other things. Another highly recommended option is to use Food Stamps when hitchhiking, which can make the difference between eating cheap food that's terrible for you and good, nutritious groceries you can pick out.