Actually a more general result is true:
If $X$ is a complex space (maybe not smooth) and if $H^1(X,\mathcal I)$ is zero for all coherent sheaves of ideals $\mathcal I\subset \mathcal O_X$, then $X$ is a Stein space.
This is Proposition 52.6 In L.Kaup-B.Kaup's Holomorphic Functions of Several Variables.
It is also proved in Taylor's book: Proposition 11.4.5
An amusing variant is that an open subset $U\subset \mathbb C^n$ is Stein iff $H^i(U,\mathcal O)$ for all $1\leq i\leq n-1$.
This is proved as Theorem 2, §5, Chapter V, page 159 of Grauert-Remmert's Theory of Stein Spaces.