We consider the singularly perturbed nonlinear elliptic problem epsilon(2)Delta v - V(x)v + f(v) = 0, v > 0, lim(vertical bar x vertical bar ->infinity) v(x) = 0. Under almost optimal conditions for the potential V and the nonlinearity f, we establish the existence of single-peak solutions whose peak points converge to local minimum points of V as epsilon -> 0. Moreover, we exhibit a threshold on the condition of V at infinity between existence and nonexistence of solutions.