Strategic value. Swiss had none or at least not alot. Belgium was the shortest way towards France for a land army and also offered the path of least resistance, allied armies often work pretty bad together in comparison to a homogenous army like the German Army. Attacking through Belgium was easier than going directly to France especially in World War 2 when the French army was defending the Maginot line. Belgium was hesitant to expand this defensive line through its own territory. The Belgian troops were pretty weak in both wars and allowed for a pretty direct path to Paris. The second important point was Belgiums geographical position in regards to the Uk. Fast movement through Belgium allowed for a possible split of French and British forces, in both wars. The near to the coast possed a major threat to British troops. If the coast line would have been in German hands this would have had major effects on the British war effort, the resupplying would have been much harder for example.
France and Germany were rivals for a long time. Both countries challenged to be the major power on continental Europe and Belgium is right between them. France will defend its northern regions at all costs since a big part of their population and industry is there. Losing Paris is equal to losing the war. On top of that Belgium had major strategical implications on the British.
Belgiums made the "mistake" with trying to be neutral. In total war you are only "allowed" to stay neutral until a major power thinks your neutrality is detrimental to their own war effort. The inconsequential efforts to coordinate with France allowed for the rapid advance through Belgium. Belgium tried to appease Germany with minimizing their collarboration with France but like i said their is no neutrality if your country is the shortest way towards Paris.
The Belgians were easily over run because of differences in terrain, which also influenced WHY Belgium was being over run in the first place.
Switzerland is an incredibly mountainous country, and is surrounded by more still; the country is smack dab in the Alps.
Belgium on the other hand is located on the western most end of the Northern European Plain, especially the part of the country north of the Ardennes and the Meuse River.
Swiss neutrality had been agreed upon in 1815, and all of it's neighbours were willing to respect it. Belgium was also neutral, obliged to defend itself against any incursions, with the assurances of Britain, France, Prussia (Germany), Austria (-Hungary), Russia and Netherlands that they would defend Belgian sovereignty against an aggressor.
The offensive plans drawn up by the Germans prior to 1913 envisioned one front and two front wars against either Russia or France; after 1913, they envisioned a two front war, with the bulk of the army focusing against France by invading through Belgium. This was the only route that could avoid the French fortress belt to the south, guarding the Franco-German Border.
As noted below, Belgium had strategic value, Switzerland didn't; hence why the Germans invaded, and the French and the British sought to drive the Germans out.