What caused the switch to the beret we see today?
The Bundeswehr never switched from helmet to beret, the helmet is still part of the dress uniform. There are just several versions of the dress uniform.
The dressuniform is called Dienstanzug in German and is worn with a beret in the army. Air force usually wears a side cap and the navy has it's sailor cap. Luftwaffe and Marine only have some (infantry) units that wear a beret. The Marine never wears a helmet with their Dienstanzug.
However, to certain occasions you can be ordered to wear the helmet. Often also combined with the coat
Such occasions can be the Großer Zapfenstreich (grand tattoo, the highest military ceremony we have in the Bundeswehr) or when you are a honour guard at a military swearing in ceremony. So it's pretty rare for the average soldier to wear the Großer Dienstanzug with the helmet.
When I was sworn in in August all soldiers wore the beret, as there were only army units there. Only the honorary guard platoon and the officers accompanying the NCOs carrying the unit flags wore a helmet, but not the large coat. The Gebirgsjäger (mountain infantry) wore their special suit with skiing trousers and jacket and the Bergmütze with an Edelweiß.
There is one exemption to this rule, the Wachbataillon beim BMVg, the elite drill unit. They do all the honour guard duties and therefore have a slightly different uniform. Instead of modern combat boots the still wear the old Knobelbecher (jackboots). use the K98k rifle for drills, wear a white harness otherwise only worn by Feldjäger (MPs) and have a special protocoll duty helmet. Instead of the normal Gefechtshelm (combat helmet M92) they have a special version made out of lightweight material just like a bicycle helmet.
Here is a recent video of the Wachbataillon marching in with the Yorckscher Marsch to a Großer Zapfenstreich in 2019. You can see the Heer and Luftwaffe soldiers of the Wachbataillon and Musikkorps wear the protocoll helmet and the soldiers of the Marine wear their sailor cap.
There is also this video of a Großer Zapfenstreich of the East German people's army from 1989. It shows the final part of the Zapfenstreich (Vorbeimarsch) where all units finally leave and parade in front of the honour guests doing the salute. You can see that the East German army used the same Prussion protocols and traditions in their military drill.
For further information, there is also /r/bundeswehr where you can get a more detailed answer. AFAIK we also have some soldiers of the Wachbataillon there.
Also have a look at https://de.wikipedia.org/wiki/Dienstanzug_(Bundeswehr) It is in Germany but has a lot of official pictures of the dress uniforms of Heer, Marine and Luftwaffe.
Sources are