In this paper, the electrical and optical properties of single-layer MoS2 and single-layer WS2 in three strain states: biaxial tension, biaxial compression, biaxial tension and compression are systematically studied. All calculations are based on the first-principle of density functional theory. The results show that after biaxial tension strain, biaxial compression strain, and biaxial tension-compression strain are applied, the atomic structure, energy band structure, and optical absorption coefficient will show disparate changing trends. When the biaxial tension and compression strain intensity is less than 15%, the bond length, bond angle, and light absorption peak will have little fluctuation with the increase of strain intensity. However, compared with the other two strain states, these two crystal structures are the most volatile at this time. In addition, when 15% biaxial tensile strain is applied, the two crystals can still maintain their kinetic stability.