The Kubo-Martin-Schwinger boundary condition, which had first been introduced as a property characterizing the canonical ensemble average in quantum statistical mechanics, was later recoginized as a property characterizing the modular automorphisms in the so-called Tomita-Takesaki theory of von Neumann algebras. This miraculous link made it possible to apply powerful mathematical technique supplied by the Tomita-Takesaki theory to a study of some problems in mathematical formulation of statistical mechanics. More recently, the KMS condition in classical statistical mechanics has also been investigated. The aim of this exposition is to review for non-specialists those development of the “rigorous” treatment of statistical mechanics which are related to the KMS condition.