The diarylethene derivative 1,2-bis-(5'-dimesitylboryl-2'-methylthieny-3'-yl)-cyclopentene (1) containing dimesitylboryl groups is an interesting photochromic material. The dimesitylboryl groups can bind to F(-), which tunes the optical and electronic properties of the diarylethene compound. Hence, the diarylethene derivative 1 containing dimesitylboryl groups is sensitive to both light and F(-), and its photochromic properties can be tuned by a fluoride ion. Herein, we studied the substituent effect of dimesitylboron groups on the optical properties of both the closed-ring and open-ring isomers of the diarylethene molecule by DFT/TDDFT calculations and found that these methods are reliable for the determination of the lowest singlet excitation energies of diarylethene compounds. The introduction of dimesitylboron groups to the diarylethene compound can elongate its conjugation length and change the excited-state properties from π→π* transition to a charge-transfer state. This explains the modulation of photochromic properties through the introduction of dimesitylboron groups. Furthermore, the photochromic properties can be tuned through the binding of F(-) to a boron center and the excited state of the diarylethene compound is changed from a charge-transfer state to a π→π* transition. Hence, a subtle control of the photochromic spectroscopic properties was realized. In addition, the changes of electronic characteristics by the isomerization reaction of diarylethene compounds were also investigated with theoretical calculations. For the model compound 2 without dimesitylboryl groups, the closed-ring isomer has better hole- and electron-injection abilities, as well as higher charge-transport rates, than the open-ring isomer. The introduction of dimesitylboron groups to diarylethene can dramatically improve the charge-injection and -transport abilities. The closed isomer of compound 1 (1 C) has the best hole- and electron-injection abilities, whereas the charge-transport rates of the open isomer of compound 1 (1 O) are higher than those of 1 C. Importantly, 1 O is an electron-accepting and -transport material. These results show that the diarylethene compound containing dimesitylboryl groups has promising potential to be applied in optoelectronic devices and thus is worth to be further investigated.