I presume you are talking about spontaneous radiative transitions. If you allow stimulated emission or collisional de-excitation then obviously this depends on the external environment.
The basic answer is that you have to do the calculation quantum mechanically. Some transitions are quick, but others (known as forbidden transitions) can be very long indeed, such that they are almost never seen to proceed radiatively in a laboratory. The transition responsible for the 21cm line of neutral hydrogen, has a radiative lifetime of $10^{7}$ years. If you need to know the answer for a particular transition you need to look up the Einstein A coefficient for the transition and take its reciprocal.
However, there is a handwaving classical argument that gets the answer about right for transitions that are allowed by the quantum mechanical electric dipole selection rules. You take the energy of an electron in its "orbit" around a nucleus and then plug its acceleration into Larmor's formula for the power radiated by an accelerating charge. Dividing one by the other gives you a classical radiative lifetime for the electron, which is
$$\tau \simeq \frac{6\pi \epsilon_0 m_e c^3}{e^2 \omega^2},$$
where you would insert $\hbar \omega = E_2-E_1$ for the angular frequency of the transition.
If you put in some numbers for the hydrogen Lyman alpha transition ($\omega = 1.55\times 10^{16}$ rad/s) you get $7\times 10^{-10}$ s, which is within a factor of a few of (smaller than) the quantum mechanical calculation.