You want coherent sheaves to have finite global resolutions by locally free sheaves. 
So definitely you need the regularity of $X$ to ensure that a locally free  resolution stops at a finite stage. You also need a  global condition such as quasiprojectivity over an affine base to guarantee that you can start the process. (The last condition  is not optimal.)

Edit: In reading the follow up comments, I realize my answer was a bit cryptic. The
inverse map $K_0(X)\to K^0(X)$ would send the class of a coherent sheaf to the alternating
sum of the classes in a resolution. In general, these groups behave quite differently. $K^0(X)$ is contravariant like cohomology and $K_0(X)$ is covariant for proper maps like (Borel-Moore) homology. That they coincide for  regular schemes is
reminiscent of Poincaré duality.