With the rapidly increasing integration density and power density in nanoscale electronic devices, the thermal management concerning heat generation and energy harvesting becomes quite crucial. Since phonon is the major heat carrier in semiconductors, thermal transport due to phonons in mesoscopic systems has attracted much attention. In quantum transport studies, the nonequilibrium Green's function (NEGF) method is a versatile and powerful tool that has been developed for several decades. In this review, we will discuss theoretical investigations of thermal transport using the NEGF approach from two aspects. For the aspect of phonon transport, the phonon NEGF method is briefly introduced and its applications on thermal transport in mesoscopic systems including onedimensional atomic chains, multi-terminal systems, and transient phonon transport are discussed. For the aspect of thermoelectric transport, the caloritronic effects in which the charge, spin, and valley degrees of freedom are manipulated by the temperature gradient are discussed. The timedependent thermoelectric behavior is also presented in the transient regime within the partitioned scheme based on the NEGF method.