Diarylethene (DAE) is one of the most widely used functional units for electrochromic or photochromic materials. To better understand the molecular modification effects on the electrochromic and photochromic properties of DAE, two modification strategies, substitution with functional groups or heteroatoms, were investigated theoretically by density functional theory calculations. It is found that red-shifted absorption spectra caused by a decreased highest occupied molecular orbital-lowest unoccupied molecular orbital energy gap and S0 → S1 transition energy during the ring-closing reaction become more significant by adding different functional substituents. In addition, for two isomers, the energy gap and S0 → S1 transition energy decreased by heteroatom substitution of S atoms with O or NH, while they increased by replacing two S atoms with CH2. For intramolecular isomerization, one-electron excitation is the most effective way to trigger the closed-ring (O → C) reaction, while the open-ring (C → O) reaction occurs most readily in the presence of one-electron reduction. Moreover, it is confirmed that substitution with strong electron donating groups (-OCH3/-NH2) or with one O/two CH2 heteroatoms leads to a more favorable closed-ring (O → C) reaction. Functionalized with strong electron-withdrawing groups (-NO2 and -COOH) or one/two NH heteroatom substitutions, the open-ring (C → O) reaction is easier. Our results confirmed that the photochromic and electrochromic properties of DAE can be tuned effectively by molecular modifications, which provides theoretical guidance for the design of new DAE-based photochromic/electrochromic materials.