We present an investigation of the geometric, electronic, and optical properties of various bulk MAPbX3 (X = Cl, Br, and I) perovskite systems in different phases and of different heterointerface models built between MAPbI3 (hereafter MAPI) and TiO2, linked by a bifunctional para-benzoic acid derivative, in view of their importance as key components of perovskite solar cells. To this to model the geometric and electronic properties of these systems, with timedependent DFT calculations (TD-DFT) carried out on non-periodic clusters, extracted from the periodic models, embedded in an array of point charges reproducing the periodic electrostatic environment, thus enabling the modeling of their optical properties in condensed phases. We found that all systems investigated present favorable key features for their use as building blocks for solar devices. Furthermore, the proposed computational approach, combining periodic and non-periodic calculations, appears as a reliable and effective tool to model both the electronic and the optical properties of various key components of materials related to photovoltaic applications at low computational cost.