The eigenstates are all orthogonal so you can just take the inner product of the wavefunction with each state vector in turn to find the coefficient c_n (with the extra normalization factor tagged on). Since we're working with an infinite potential well here, the eigenstates are sine functions so this is just like a Fourier sine series if you've covered that in maths.