In the United States, an earmark is when Congress specifically sets aside a sum of money for a certain project. In the separation of powers of the United States government, it is the job of the legislative branch to give money to the executive branch, and the executive, through laws, rules and regulations, decides how to apply that money. For this reason, earmarking money in legislation to go to a specific project is seen as perhaps against the spirit, if not the letter, of the law. The fact that many of these projects go to congresspeople's homedistricts or states, and don't have to go through the normal bidding and evaluation process of a federal project, is why they are called pork or pork barrel by their detractors. They are an easy and frequent target of certain government watchdog groups, as well as by certain politicians. Another reason that earmarks are seen as being slightly deceptive is that they can be slipped into any bill. For example, if a relief package for a natural disaster is being written. a congress person can write in an item asking for money to renovate a historical post office in the upper peninsula of Michigan. To refuse this spending, congress or the President has to veto the entire bill, something that could be seen as a form of blackmail.
For all that it is easy to criticize certain earmarks, especially ridiculous examples such as The Bridge to Nowhere, they probably aren't going to go away anytime soon, and it might not make any difference if they did. There are several reasons for this. The first is that, while many earmarks are open to easy derision, many others are not. I can imagine that some future president makes a promise to veto any bill with earmarks in it, only to be confronted with a bill with an earmark for a relatively trivial amount of money to fund a program where veterans are paired with orphans to help raise kittens and overcome their mutual trauma. While not every project would be quite as charismatic as this hypothetical program, there are plenty of programs that will be quite controversial to veto-at least for a particular group of people, or in a particular district. A few million dollars spent on "The Sunflower Parasite Institute" might be mockable to some, but in North Dakota it is good politics, and perhaps good economics as well. One senators pork is another's bread and butter.
Another reason that eliminating earmarks might not be fair, is that while funds spent through the normal executive process are meant to go through an impartial review and to be spent in the most productive way, I probably won't be going out on a limb by suggesting that the executive branch is open to its own partiality (occasionally bordering on, or going into, corruption) about where money is spent. Certain corporations get big contracts and certain facilities are based in certain states. Even if we do just take this as the vagaries of fate, and not string pulling, is it really fair that, for example, Denver gets a US Mint, Florida gets the Kennedy Space Center, New Mexico gets Los Alamos National Laboratory, while my own state of Oregon has the federal center for ceramics research, not exactly an economic engine. So even without earmarks, the federal spending of money is not exactly even handed. While I don't have any particular reason to doubt the sincerity of Senator John McCain, one of the major opponents of ear marking, I wonder if perhaps he would be more inclined to see the opposite side of the issue if he wasn't representing a state that had several large military bases.
And the final reason why earmarks are being made a larger issue than they should be is the fact that they are a rather minor part of federal spending. The wikipedia page lists pork spending as compiled by several conservative groups, and even they put it at around 10 to 30 billion dollars a year over the past few years. Now, 10 to 30 billion dollars is a lot of money, but it is a pretty small amount of money compared to federal budget deficits. The US Budget deficit has been, in the same years, around 200 to 400 billion dollars a year. I think the best comparison to use is calories. If someone is eating 300 excess calories a day, cutting out 20 calories isn't really a good strategy for dieting. It is somewhat equivalent to self-righteously declaring that you are holding the mayonnaise on your bacon double cheeseburger. A fundamentally imbalanced budget isn't going to be saved by cutting out earmarks.
For all of these reasons, the objection to earmarks is likely to remain the stuff of cheap political one liners-- "And while you are working hard here, a bunch of fat cats in Washington are using YOUR tax dollars to build a pancake museum in Wisconsin!"-- more than it will of serious political discourse. Not to say that objections to earmarks don't serve some purpose-they do stop the system from getting truly out of hand. If you gave him enough rope, Ted Stevens would use it to build a bridge to New Zealand.