We present a nonlinear magnetohydrodynamic shallow-water model for the solar tachocline (MHD-SWT) that generates quasi-periodic tachocline nonlinear oscillations (TNOs) that can be identified with the recently discovered solar "seasons." We discuss the properties of the hydrodynamic and magnetohydrodynamic Rossby waves that interact with the differential rotation and toroidal fields to sustain these oscillations, which occur due to back-and-forth energy exchanges among potential, kinetic, and magnetic energies. We perform model simulations for a few years, for selected example cases, in both hydrodynamic and magnetohydrodynamic regimes and show that the TNOs are robust features of the MHD-SWT model, occurring with periods of 2-20 months. We find that in certain cases multiple unstable shallow-water modes govern the dynamics, and TNO periods vary with time. In hydrodynamically governed TNOs, the energy exchange mechanism is simple, occurring between the Rossby waves and differential rotation. But in MHD cases, energy exchange becomes much more complex, involving energy flow among six energy reservoirs by means of eight different energy conversion processes. For toroidal magnetic bands of 5 and 35 kG peak amplitudes, both placed at 45°latitude and oppositely directed in north and south hemispheres, we show that the energy transfers responsible for TNO, as well as westward phase propagation, are evident in synoptic maps of the flow, magnetic field, and tachocline top-surface deformations. Nonlinear mode-mode interaction is particularly dramatic in the strong-field case. We also find that the TNO period increases with a decrease in rotation rate, implying that the younger Sun had more frequent seasons.