Specifically in the Western European front, as the fighting took place in almost the same locations as before.
I know trench warfare arose because of a development in weaponry, specifically tanks and machine guns that was able to effectively pin down infantry (?)
So what advancements made for trench warfare to be not a viable strategy anymore?
Two items come to mind.
The first is mechanization/motorization of logistics. 1) The increased speed of a command staff to concentrate force by quickly shifting men and guns to a single point of attack meant that is was much harder than before for a defender to match buildups in a timely manner. Compare to WW1 where defenders often knew weeks in advance the targets of assaults. 2) Motorization of logistics also allowed for the exploitation of breakout opportunities in a way that was not available in WW1 with the rapid deployment of reserves to the point of breakthrough. 3) Motorization also allowed for the extention of breakthroughs for longer than in WW1, where, even on the Eastern Front where such opportunities were possible, an army would outrun its supply within a few days and as a result either have to pause and allow the broken defenders to reform and construct a new defensive position or keep pushing without supply and (inevitably) run into a fresh counter-offensive that would roll back much of the gains the breakthrough had made.
The second is wireless communication miniaturization. The ability to deploy reliable wireless communication to the tactical level was a major shift in how operations were conducted. In WW1 the time lag between a tactical event and the stragetic commander having sufficient info to respond appropriately (either the call off an attack, adjust the focus, or deploy reserves to exploit a local success) often spelled disaster, or at best lost opportunity. This was also one of the the factors that favored the defender heavily, where defenders would usually have safely buried wired communications and would be able to call in reactive artillery support or reserve forces much quicker than an attacker could (where they usually would have no communication with HQ). Wireless communications allowed for closer coordination between front line and support areas (artillery, command) so that attackers could react to the defense in a way that just wasn't possible 25 years prior.
Faster movement of men, material, and information meant that the "build a wall and make them pay" strategy was just not efficient. However, on localized terms, digging in was still hugely effective against an assault, and indeed basically imperative. To make that your whole strategy though was to waste a significant portion of your force in guarding a sector of the line that your opponent did not choose to engage.
Tanks were not a cause of trench warfare, but rather an attempt to break it. Maturity of machine guns and artillery were probably the most influential in creating the conditions of trench warfare. Tanks started out as armored behemoths that would negate the machine guns and allow armies to traverse No Man's Land. The first tanks were comparatively flimsy, very slow and very prone to breakdown, however, so it took time for it to have a decisive effect.
By WWII, tanks and air power was more mature. Digging a ditch and then sitting in it was no longer a viable strategy against fast moving armoured might. Furthermore, the improvement in communication and logistics mentioned by /u/torustorus above meant that a breakthrough could actually be sustained, and static units were much easy to encircle and overrun.