We employ the quasiharmonic approximation to study the temperature-dependent lattice dynamics of the four different phases of cesium tin iodide (CsSnI3). Within this framework, we obtain the temperature dependence of a number of structural properties, including the cell volume, bulk modulus, and Grüneisen parameter. The Gibbs free energy of each phase is compared against the temperature-dependent Helmholtz energy obtained from the equilibrium structure within the harmonic approximation. We find that the black tetragonal perovskite phase is not dynamically stable up to at least 500 K, with the phonon dispersion displaying negative optic modes, which pass through all of the high-symmetry wave vectors in the Brillouin zone. The main contributions to the negative modes are found to be motions of the Cs atom inside the perovskite cage. The black cubic perovskite structure shows a zone-boundary instability, indicated by soft modes at the special q points M and R. These modes are present in calculations at the equilibrium (0 K) lattice constant, while at finite temperature additional negative modes develop at the zone center, indicating a ferroelectric instability. The yellow crystal, composed of one-dimensional (SnI6)n double chains, has the same heat of formation as the orthorhombic perovskite phase at 0 K, but becomes less energetically favorable at higher temperatures, due to its higher free energy.