Yea the i5-8400 has plenty of performance. No overclocking, so go i5-8600K if you want that. Otherwise the i5-8400 is fine.
I'm a fan of the extra life you get out of Hyper-Threading. I feel it helps extend the amount of time I can use the system before I need to upgrade. There is more reason to go for the i7 if you will do more than just gaming, but for gaming alone, it's not necessary. But this is just my personal preference.
Deciding between the i5-8400, i5-8600K and the i7-8700K you will just need to decide based on your budget and what you plan to use the PC for.
Happy building