We study a problem when the optimal stopping for a one-dimensional diffusion process is generated by a threshold strategy. Namely, we give necessary and sufficient conditions (on the diffusion process and the payoff function) under which a stopping set has a threshold structure.