Using first-principles calculations, we investigate the band structure evolution and topological phase transitions in TlBiS2 and TlSbS2 under hydrostatic pressure as well as uniaxial and biaxial strain. The phase transitions are identified by parity analysis and by calculating the surface states. Zero, one, and four Dirac cones are found for the (111) surfaces of both TlBiS2 and TlSbS2 when the pressure grows, which confirms trivial-nontrivial-trivial phase transitions. The Dirac cones at the (M) over bar points are anisotropic with large out-of-plane component. TlBiS2 shows normal, topological, and topological crystalline insulator phases under hydrostatic pressure, thus being the first compound to exhibit a phase transition from a topological to a topological crystalline insulator.