PIB wave functions and the effects of e- delocalization on UV absorption in conjugated systems
You can use the PIB model as a very approximate way of thinking about energy levels in conjugated ($\pi$ electron) molecules. Absorption in triatomics is much more tricky, however, and usually a Walsh diagram is necessary. 

The general idea is that as the conjugation gets larger the absorption wavelength for electronic transitions gets smaller and so shifted to the red part of the visible spectrum. (A similar argument applies to particles on a ring for aromatics) 

The energy levels of a PIB vary as $E_n \approx (n/L)^2$ where n is the quantum number and L the length of the box, or conjugation. Take this to be sum of all conjugated bond lengths. Thus as L gets larger the energy levels become closer together. Secondly as the number of conjugated bonds increases the number of quantum levels filled also increases, as there are more electrons. The optical transition is from the highest filled level to the next one up (HOMO-LUMO), the energy difference is $E_{n+1}-E_n$ at each value of L. If you take the length of the box to be the number of bonds m of length a, then $L=ma$ it is easy to show that the absorption spectrum shifts to the red as the conjugation increases, although you should definitely not expect accurate values in terms of energies.