How important is ergodic theory in fundamentally understanding statistical mechanics? Recently, I realized the physics course in my uni has been lacking mathematical rigor and I have been attempting to compensate by adjoining it with personal mathematical study. For example, learning some functional analysis before going into quantum mechanics. Does ergodic theory have the same importance in statistical mechanics? 
In other words, is the understanding of ergodic theory fundamental for understanding the math that underlies statistical mechanics like, for example, Hilbert spaces in quantum mechanics?
 A: In a usual quantum mechanics course, you will see Hilbert spaces everywhere even if the course is not mathematical enough to point them out and not rigorous enough to prove some important things that follow from them about operator spectra and bases and what have you. The situation with ergodic theory and a typical introductory course in statistical mechanics is a bit different. Generally, in stat mech one can neatly decouple the assumption of ergodicity from its consequences. In other words, usually the starting point is to assume a closed system is ergodic and explore the consequences of that. 
It would certainly be an advantage for you to have a mathematical understanding of what ergodicity is, and it would also be good to have an intuition for when there will be ergodicity breaking. However the issue of whether the assumption of ergodicity can be proven correct for an underlying dynamical system (which would be what ergodic theory would bear on most directly) is usually not treated with much importance. The macroscopic consequences that are more of interest involve different concepts. (The mathematical structures you might see lurking here are manifolds. And in fact there are strong connections between statistical mechanics and quantum mechanics.) [EDIT I'm wrong here. Ergodic theory does have important applications in the thermodynamics. See Robert Israel's comment]
None of this is to discourage you from learning the subject if you're interested, of course.
