In this paper, a diffuse-interface immersed boundary method (IBM) is proposed to treat three different thermal boundary conditions (Dirichlet, Neumann, Robin) in thermal flow problems. The novel IBM is implemented combining with the lattice Boltzmann method (LBM). The present algorithm enforces the three types of thermal boundary conditions at the boundary points. Concretely speaking, the IBM for the Dirichlet boundary condition is implemented using an iterative method, and its main feature is to accurately satisfy the given temperature on the boundary. The Neumann and Robin boundary conditions are implemented in IBM by distributing the jump of the heat flux on the boundary to surrounding Eulerian points, and the jump is obtained by applying the jump interface conditions in the normal and tangential directions. A simple analysis of the computational accuracy of IBM is developed. The analysis indicates that the Taylor-Green vortices problem which was used in many previous studies is not an appropriate accuracy test example. The capacity of the present thermal immersed boundary method is validated using four numerical experiments: (1) Natural convection in a cavity with a circular cylinder in the center; (2) Flows over a heated cylinder; (3) Natural convection in a concentric horizontal cylindrical annulus; (4) Sedimentation of a single isothermal cold particle in a vertical channel. The numerical results show good agreements with the data in the previous literatures.