Nothing but the potential energy!
Those cryptic graphs you're looking at are called wavefunctions, and they encode everything there is to know about a particle in a particular environment - where it could be, how fast it could be going, how quickly it could be spinning... no matter what you want to know, there's a way to get from the wavefunction to your answer with some fancy mathematical footwork. In the graphs above, the x-axis represents position. Regions of high amplitude correspond to locations where the particle is likely to be found; regions of short wavelength correspond to locations where the particle has a high kinetic energy.
To find the wavefunctions for a particle, we need to solve the Schrödinger equation (pictured in the figure) - which could involve anywhere from two lines of scrawled notes to ten pages of painstaking calculations. What the Schrodinger equation essentially gives us is a relationship between how a particle's energy (the left-hand side) affects how it moves in time (the right-hand side). No matter what, the Schrödinger equation always depends on the potential energy V, and importantly...
The only difference in the Schrödinger equation from particle to particle is V - the potential energy!
Imagine you're coasting in a car through a landscape of hills and valleys. As you crest each hill, you slow down and gain potential energy, and as you enter each valley, you speed up - gaining kinetic energy along the way. As it turns out, provided your car isn't providing any acceleration of its own, a savvy physicist could construct a potential energy function for the landscape: a sort of topographical map with highs near the peaks and lows in the valleys (see the above figure). Using this map, that physicist could use the Schrodinger equation to find out everywhere you could've been, anywhere you could be going, and how fast your car could travel.
Ultimately, V is just a map of the potential energy inherent to an environment at each given location. In our example, the car's energy is stored in the form of potential energy by the Earth's gravitational field as it moves uphill, then released once more as it descends. But V includes to more than just gravity, representing the sum total of electromagnetic, gravitational, and nuclear potential energies for a particle in a given environment.
Long story short, the potential energy tells you everyhing about a particle's environment - and plugging this into the Schrödinger equation, we can compute every single allowed state for a particle! And remember, this is very important, since many quantum particles (like atoms) aren't allowed to exist in just any state.
We won't go too into detail here - the exact effects of different potential energies on the wavefunction of a particle warrant several semesters worth of coursework! But there are a couple key behaviors that summarize how a potential function sculpts the wavefunction of particles exposed to it:
In quantum mechanics, particles and waves are one and the same (this is very unintuitive, I'll have to ask for your blind trust on this one). The kinetic energy of a particle increases with the reciprocal of its wavelength - so a particle with high kinetic energy will have a short wavelength.
Weirdly, quantum mechanics doesn't give you the exact location for a particle as it evolves (as it turns out, this is impossible). Instead, it gives you a distribution of locations where that particle might be found if you looked for it. As mentioned earlier, wavefunctions have large amplitude wherever they are most likely to be.
When a quantum particle has more energy than the potential energy at some location, its kinetic energy is nonzero and it oscillates like a wave.
When a quantum particle has less energy than the potential energy at some location, its wavefunction exponentially decays but is not necessarily zero. This is a remarkable behavior - it would be like if a phone resting in your hand (which doesn't have enough energy to painfully "break through") had a small but nonzero chance of being found an inch lower - and falling straight to the floor!
The figure above shows how a potential energy function known as a barrier (zero in Regions 1 and 3, and nonzero in Region 2) affects the wavefunction of a particle which starts in Region 1 with less energy than it needs to break through the barrier. In region 1, the amplitude is high. It makes sense that since the particle doesn't have enough energy to break through the barrier, it would remain in its starting region. But rather than going straight to zero in Region 2, there's an exponential decay, connecting the wavefunction to a smaller-amplitude (but same-wavelength) portion in Region 3. So the particle has a small change of being found where it shouldn't be, and without any less energy than it started with - somehow, it skips through the barrier without losing energy!
From the potential energy for an environment, we can compute the allowed states for a particle in that environment. And we can use the allowed states as a jumping-off point to calculate any quantity we want! For diatomic molecules, these include the set of all allowed wavefunctions, the bond length and strength, the allowed energy transitions (and consequently the entire emission spectrum), the Einstein A Coefficients (which describe how quickly different excited states decay), and the Franck-Condon factors (which describe how likely a given quantum leap is to occur as the molecule decays), just to name a few.
It's no wonder that calculating the potential energy curves for a molecule is of great interest in spectroscopy. If only there was a way to do this from a limited sample of spectroscopic data - is there a way we can use a small set of easy-to-extract information to fill in everything there is to know about a molecule?
Infinite Square Well Wavefunctions: Bucknell Physics 212 Supplement. Solutions for the Infinite Square Well. https://aimath.org/~farmer/tmp/phys212supplement/sec_infinite_sq_well.html
Harmonic Oscillator Wavefunctions: Physics LibreTexts. The Quantum Harmonic Oscillator. https://phys.libretexts.org/Bookshelves/University_Physics/University_Physics_%28OpenStax%29/University_Physics_III_-_Optics_and_Modern_Physics_%28OpenStax%29/07%3A_Quantum_Mechanics/7.06%3A_The_Quantum_Harmonic_Oscillator
Time Dependent Schrodinger Equation: Thoughts. Visualizing the Schrodinger Equation. https://andrewmacthoughts.blogspot.com/2017/06/visualizing-schrodinger-equation.html
Potential Landscape Example: Chemistry LibreTexts. The Potential Energy Surface Can Be Calculated Using Quantum Mechanics. https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Physical_Chemistry_%28LibreTexts%29/30%3A_Gas-Phase_Reaction_Dynamics/30.10%3A_The_Potential-Energy_Surface_Can_Be_Calculated_Using_Quantum_Mechanics
Wavefunction Potential Energy Example: Riga, Jeanne & Seviour, Rebecca. (2022). Electromagnetic Analogs of Quantum Mechanical Tunnelling. 10.48550/arXiv.2211.16369.