I would re-emphasize what has been said by vanhees71 and Vanadium 50, but if you are looking for an intuitive argument I believe there is one. Informally speaking, there are two approaches to solving problems in quantum mechanics: the linear algebra approach and the differential equation approach. In the linear algebra approach, quantum numbers like n tend to arise from considerations of the eigenvalues (formally speaking, they are associated with ladder operators when the problem is nice enough to provide them). In the differential equations approach, quantum numbers tend to arise from the Frobenius method of solving differential equations (formally speaking, they are solved for in the first non-zero index equation) or from periodic boundary conditions. Now, the mode quantum number "n" in the particle in a box problem is derived from a periodic boundary condition, which is easy to remember; however, the radial quantum number "n" in the hydrogen atom is derived from the index equations of the radial equation, which is not so easy to remember (to put it mildly). To make an intuitive argument at the expense of mathematical rigor and the correct interpretation of the radial quantum number, you can exchange the solution of the hydrogen atom for the Bohr model in this case. In the Bohr model, the quantum number "n" is derived from a periodic boundary condition as well.
The intuitive argument is as follows: in the Bohr model the periodicity condition ##2\pi r_{n} = n \lambda## means that ##r_{n}## scales with n. Since the energy in the Bohr model goes with the inverse square of r, you know the energy levels go with the inverse square of n. On the other hand, for the particle in a box, the periodicity condition ##\pi L = n \lambda## means that the wavenumber ## k_{n} = \frac{2\pi}{\lambda} ## scales with n. Since in the box V = 0, E = T is proportional to ##p^{2}##, which by the de Broglie relation is proportional to ##k^{2}## which you know is proportional to ##n^{2}##.
Again, to reiterate, this argument is not entirely true, since the Bohr model correctly predicts the quantum number n for the wrong reasons. When you solve the hydrogen atom, the orbit periodicity condition defines ##m_{l}## not n. The only reason I'm proposing this argument is that it is easier to produce from first principles off hand.