It is not such a simple question. Lasers are complicated.
If an atom absorbs some energy (perhaps a photon), an electron can be promoted from a low energy state to a high energy state. If the atom sits undisturbed for a while, it can spontaneously decay. The electron returns to the low energy state and a photon of wavelength $hc/\lambda$ is emitted.
Another possibility is that a photon of wavelength $\lambda$ can pass by the excited atom and stimulate the emission of another photon. The electron drops to the low energy state. The emitted photon has wavelength $\lambda$, is in phase with the first one, and travels in the same direction. This is stimulated emission.
Excited-state Absorption can happen too. In most lasers, the photons are not so energetic that a second absorption will ionize the atom. That means a third state with the right energy must be present. In many lasers, there is no such state. When it is present, there are techniques to reduce the effect. On the other hand, some lasers take advantage of it to double the frequency of the laser light.
There is another issue related to your question.
Lasers work by stimulated emission in an optical cavity. Suppose you have a population of excited atoms between two mirrors. Some of them spontaneously decay. Some of the photons happen to be in the right direction to be reflected back and forth, passing through the atoms again and again. These photons can stimulate emission of more photons. The number of photons grows, creating a producing coherent laser beam.
This glosses over many complications. For growth:
- The cavity must be designed carefully. Light must repeat its path and interfere constructively after a round trip. Diffraction makes the beam spread. The mirrors must slightly focus the beam to counteract this. Otherwise more photons will leak out the sides than are created by stimulated emission. See laser modes and Gaussian beams.
- One of the mirrors must be perhaps 99% reflective and 1% transmissive so the beam can get out of the cavity. Not too transmissive, or more photons will escape than are created.
- Atoms decay. Atoms in the low energy state absorb photons instead of emitting a second one. For growth, a photon must encounter more excited atoms than low energy atoms.
This last point is a big one. At thermal equilibrium there will be some excited atoms, but more low energy atoms. You can add raise the temperature to get more excited atoms, but never as many as lower energy. Having more excited atoms is called a population inversion. It takes some tricks to arrange one.
Even if you start with a population inversion, you have to keep adding energy to maintain it. The first thing you might think of is making a gas discharge lamp, like an ordinary neon light. You add lots of energy and make lots of excited atoms. You can see lots of photons being given off of the correct wavelength. But this doesn't work. Even though it is not at equilibrium, it is in a steady state. The lower energy population is always larger for any system with 2 energy levels.
The simplest lasers have 3 energy levels with $E_1 < E_2 < E_3$. The lifetimes of the excited states are different. $E_3$ very quickly decays to $E_2$. $E_2$ lasts much longer. State $2$ winds up with all the electrons you might have expected to be in in either $2$ or $3$. This can outnumber State $1$. So the energy source pumps electrons to state $3$, but the laser transition is $E_2 \rightarrow E_1$.
This works, but lasers with 4 levels are more efficient.