BBS is the earliest, unless you count χ which isn't out yet, DDD is the last.

But honestly? Just like with the Narnia books, it's the easiest to understand if you play them in the order they released rather than using the in-game chronology. A prequel is a prequel for a reason - even though it takes place in the past, it should be played after because it relies on your knowledge of the previous entries.

So, the ideal order to play the games is thus:

KHI > Chain of Memories > KHII > 358/2 Days/Birth by Sleep/Re: coded* > Dream Drop Distance > Unchained χ** > Birth by Sleep 0.2**


*these three were developed and released about the same time, so you can play them in any order and still understand what's going on, though I'd recommend going with the order I listed
**not yet released in the West; the former is coming out as a mobile title soon, while the latter is part of this here HD remaster (which also includes scenes from χ, or some scenes about how χ connects to the rest, not really sure yet)