Any of these processors would be pretty good at running current games. In a high-refresh rate setup, with a 144Hz monitor and a high-end graphics card like a 1080 Ti or 2080 running at 1080p resolution, the i5-8400 may manage to push around 5% faster frame rates on average compared to the Ryzen 2600 or 2700 at stock settings, though the exact difference could be greater or smaller, depending on the game.
Under a more typical setup, like running one of those cards at 1440p resolution, or an upper mid-range card like a 1070 or 1660 Ti at 1080p, performance will be more limited by the graphics card in newer games at high settings, and on average there should only be around a 2% performance difference separating these CPUs. And with an overclock of the Ryzen parts, those differences could be a bit smaller still.
As for the 2600 vs the 2700, for today's games, there won't be much of a difference between them. They both offer similar clocks, and at stock settings, the 2600 actually boosts a little higher, making it slightly faster in games. Overclocked, performance would be rather similar, though the 2700 does come with a somewhat better cooler that's more capable of a bit of overclocking. Today's games simply don't make use of enough threads to benefit much from having access to more than the 6 cores / 12 threads that the 2600 has to offer though, so moving up to the 8 cores / 16 threads of the 2700 won't help gaming performance much, unless perhaps you are doing something like streaming or otherwise heavily multitasking while gaming. Maybe future games will benefit from those extra cores, but currently that's not really the case, and I suspect it will be quite a while before that becomes common. It is worth noting that the Ryzen 2600 has SMT (what Intel calls Hyperthreading), allowing it to more efficiently run up to twelve threads, while the i5-8400 does not. So, as games become more multithreaded, it's possible that the 2600's performance could improve relative to the 8400 in some titles, though it's difficult to say exactly what the demands of future games will be like.
In general, unless you are already planning on going with a high-end card, putting that extra 50 euros toward moving up to a higher-end graphics card would likely net you better performance in most titles. What kind of GPU and other hardware were you thinking of putting in the system?