Herein, we carry out a density functional theory based investigation to understand the structural and electrical properties, such as band structure, partial density of states, electron density difference and optical properties of the ZnTe/CdSe/GaSb heterotrilayer. The results show that the stacking order and interlayer distance will affect the stability of the structure. The stacking order of monolayer ZnTe, CdSe and GaSb is the most stable (C structure), with the direct bandgap is only 0.210 eV. The heterostructure has a strong binding force which may be due to the local atomic orbital hybridization. In addition, the ZnTe/CdSe/GaSb heterotrilayer has excellent optical properties in ultraviolet, visible and infrared regions, and has stronger absorption ability for visible light compared to each monolayer. Finally, compared with the ZnTe/CdSe, ZnTe /GaSb and CdSe/GaSb, heterobilayers show that the heterotrilayer has smaller direct bandgap, and has better photoelectric properties. The ZnTe/CdSe/GaSb heterotrilayer has a stable structure and excellent photoelectric performance, which has good potential and wide application prospects in nano electronic devices, photoelectric devices, visible light absorption, photocatalysis, infrared light conversion and detection.