Does "The proton being in the first excited state" have some effect on
the wavefunction or the question?
Yes, it does. The wavefunction of the first-excited state is different from the ground state and all the other, higher, excited states. (See Ron Maimon's answer or search the web by "particle in a box".) The difference of the wavefunctions makes difference of properties between the states, such as the probability density of finding the proton at a given position in the box.
For example, if the proton is in the ground state, the probability density to find it at the center of the box is non-zero (actually it is maximum over all the possible position in the box), whereas if the proton is in the first-excited state, the probability density to find it at the center of the box is exactly zero.
As another point, the energy eigenvalue of the first-excited state is different from the ground state and all the other, higher, excited states. The energy of the emitted or absorbed photon depends on the energy difference of the initial and final states of the optical transition. Therefore, whether the proton is in the first-excited state or another higher-excited state makes difference in the photon energy when a photon is emitted by a transition to the ground state.
By the way, given two states, the transition between these two states may be either allowed or prohibited depending on the number of photons emitted/absorbed and depending on the transition is by the dipole/polarizability/hyperpolarizability/.. interaction or quadrupole interaction, etc., with the optical field. A rule whether a transition is allowed or prohibited is generally called a selection rule. This has to do with the symmetries of the interaction as well as the states involved.
In summary, it is not enough to know what system (e.g., a proton in an infinite well) is at hand, but necessary to know what state (e.g., the first-excited state) or a superposition of states (i.e., a wavepacket) the system is in, in order to make any prediction. (Let me try to make a (vague) analogy in classical mechanics. It is not enough to know that a stone of mass 1 kg is flying in a free space, but I would like to know in which direction, at what speed, and at what position it is flying in order to calculate if it is hitting me and to decide if I should call my mama.)