In recent years, two-dimensional (2D) materials have attracted significant attention due to their distinctive properties, including exceptional mechanical flexibility and tunable electronic properties. Via the first-principles calculation, we investigate the effect of strain on the electronic properties of monolayer SnP2S6 and GeP2S6. We find that monolayer SnP2S6 is an indirect band gap semiconductor, while monolayer GeP2S6 is a direct band gap semiconductor. Notably, under uniform biaxial strains, SnP2S6 undergoes an indirect-to-direct band gap transition at 4.0% biaxial compressive strains, while GeP2S6 exhibits a direct-to-indirect transition at 2.0% biaxial tensile strain. The changes of the conduction band edge can be attributed to the high-symmetry point Γ being more sensitive to strain than K. Thus, the relocation of the conduction-band and valence-band edges in monolayer SnP2S6 and GeP2S6 induces a direct-to-indirect and indirect-to-direct band-gap transition respectively. Consequently, the strain is an effective band engineering scheme which is crucial for the design and development of next-generation nanoelectronic and optoelectronic devices.