Everything in QM 1 (supposed you don't introduce spin) can be derived from the Heisenberg algebra of observables. For the harmonic oscillator you introduce creation and annihilation operators which fulfill the commutation relations
$$[\hat{a},\hat{a}^{\dagger}]=1.$$
The Hamiltonian reads
$$\hat{H}=\hbar \omega \left (\frac{1}{2} + \hat{N} \right), \quad \hat{N}=\hat{a}^{\dagger} \hat{a}.$$
Obviously ##\hat{N}## is a positive semidefinite operator, because for any ##|\psi \rangle##
$$\langle \psi |\hat{N} \psi \rangle=\langle \psi|\hat{a}^{\dagger} \hat{a} \psi \rangle = \langle \hat{a} \psi|\hat{a} \psi \rangle \geq 0,$$
because the scalar product is semidefinite.
Now suppose ##|n \rangle## is an eigenvector of ##\hat{N}## with eigenvalue ##n \in \mathbb{R}##. Note that ##\hat{N}## is self-adjoint and thus can have only real eigenvalues. Now we have
$$[\hat{N},\hat{a}]=[\hat{a}^{\dagger} \hat{a},\hat{a}]=[\hat{a}^{\dagger},\hat{a}]\hat{a}=-\hat{a}.$$
This implies
$$\hat{N} \hat{a} |n \rangle = ([\hat{N},\hat{a}]+\hat{a} \hat{N}) |n \rangle = (\hat{a} \hat{N}-\hat{a}) |n \rangle = (n-1) \hat{a} |n \rangle,$$
i.e., ##\hat{a} |n \rangle## is either an eigenvector of ##\hat{N}## with eigenvalue ##n-1## or 0.
This implies that applying ##\hat{a}^k## (##k \in \mathbb{N}##) to ##|n \rangle## you either get an eigenvector to the eigenvalue ##n-k## or ##0##. Since ##\hat{N}## is positive semidefinite, all eigenvalues are ##n \geq 0##. This implies that there must be a minimal eigenvalue ##n_{\text{min}}## such that ##\hat{N} |n_{\text{min}} \rangle=0##, but this implies that ##n_{\text{min}}=0##, because the former equation tells you that ##|n_{\text{min}} \rangle## is and eigenvector of ##\hat{N}## with eigenvalue 0.
Now you have
$$[\hat{N},\hat{a}^{\dagger}]=[\hat{a}^{\dagger} \hat{a},\hat{a}^{\dagger}]=\hat{a}^{\dagger} [\hat{a},\hat{a}^{\dagger}]=\hat{a}^{\dagger},$$
and thus you find
$$\hat{N} \hat{a}^{\dagger} |n \rangle = ([\hat{N},\hat{a}^{\dagger}]+\hat{a}^{\dagger})|n \rangle=(n+1) \hat{a}^{\dagger}|n \rangle,$$
i.e., ##\hat{a}^{\dagger}## is an eigenvector of ##\hat{N}## with eigenvalue ##(n+1)##.
Now you can build all eigenvectors from ##|0 \rangle## by repeated application of ##\hat{a}^{\dagger}##. It's easy to show with the commutation relations that the properly normalized eigenvectors of ##\hat{N}## are given by
$$|n \rangle = \frac{1}{\sqrt{n!}} (\hat{a}^{\dagger})^n |0 \rangle.$$
The eigenvalues of ##\hat{N}## are thus ##n \in \{0,1,2,3,\ldots \}=\mathbb{N}_0##, and thus the energy eigenvalues
$$E_n=\hbar \omega \left (\frac{1}{2} +n \right), \quad n \in \mathbb{N}_0.$$