Nonlinear optical (NLO) materials are a distinctive class of materials due to their NLO response and wide range of applications. We present a systematic quantum chemical study for designing triphenylamine based derivatives (1Ph to 3PhDTDZ) by modifying central bridge with various size and types of heterocyclic rings. Density functional theory (DFT) method is used to calculate the NLO properties including linear and third-order NLO polarizabilities (α and γ) by using M06-2X functional coupled with the 6-311G** basis set. The calculation results predict that among the designed compounds, 1PhDTDZ has the highest third-order NLO polarizability of 2347.7 x 10−36 esu and lowest transition energy of 1.828 eV. On the other hand, 3PhDTDZ has a greater amplitude (108.5 x 10−24 esu) of static linear polarizability (αiso). We also computed frequency-dependent third-order NLO polarizability values at various laser wavelengths (1500 nm to 1970 nm). This provides valuable information about the complex interaction between light and matter. Dynamic second hyperpolarizability of electro-optic Pockels effect (EOPE effect, (γ (−ω; ω,0,0)) is calculated at 1500 nm laser wavelength with a larger γ-amplitude of 36708.4 x 10−36 esu. The effect of solvent on α and γ has also been the primary focus of this research. An extensive solvation impact has been studied using integral equation formalism Polarizable Continuum Model (IEFPCM) and Conductor-like Screening Model (COSMO). Magnitudes of αiso and 〈γ〉 have shown variation from gas to solvent methods. While among solvents, amplitudes are seen 3.87 % to 11.29 % greater under the effect of COSMO-methanol than PCM-methanol. The Frontier molecular orbital (FMO) studies found a significant decrease in energy band gaps from 5.75 eV to 2.98 eV. Since our systems exhibit remarkable photovoltaic properties, they can be used as dye-sensitized solar cells (DSSCs). Their open circuit voltage (VOC) ranging from 1 eV to 4 eV. Thus, our designed triphenylamine based derivatives with distinct central heterocyclic bridges showcase remarkable efficiency as NLO materials, with additional benefits of exhibiting good photovoltaic properties.