The pyrene group in conjugation with the thiophene moiety was used to design new organic molecules for the dye-sensitized solar cells (DSSCs) along with non-linear optical (NLO) properties. Five new thiophene chain conjugation molecules (PTRA-SPn, n = 1–5) were formed based on the (E)-2-(5-oxo-4-((5-(pyren-1-yl)thiophen-2-yl)methylene)-2-thioxothiazolidin-3-yl)acetic acid (PTRA). To comprehend the function of conjugation in varying the optoelectronic characteristics of these compounds, the π-spacer chain has been screened. The techniques of density functional theory (DFT) and time-dependent DFT (TD-DFT) have been used to study the electronic structures, Ultraviolet–Visible (UV–Vis) absorptions, and NLO activities of donor-spacer-acceptor (D-π-A) structures. According to the computed results, PTRA-SP5 exhibits a smaller energy gap (Eg) of 2.11 eV. The maximum UV–Vis spectrum has been found in PTRA-SP5 with a wavelength (λmax) of 532 nm. The reorganizational energy (RE) and dye regeneration (ΔGreg) of PTRA-SP5 are the smallest (λ- = 0.2340 eV, λ+ = 0.2122 eV, ΔGreg = 0.21 eV) compared to other sensitizers. The lowest exciton binding energies (Eb) of PTRA-SP2 (0.06 eV) and PTRA-SP3 (0.06 eV) are the lowest ones. The open circuit photovoltage (eVoc) for PTRA-SP5 (1.10 eV) is the highest. The NLO activity of the dipole moment (μnormal) and first-order hyperpolarizability (β) values of PTRA-SP5 achieve higher values (9.00 Debye and 34.82 × 10−30 esu, respectively). In summary, this work refined the impact of chain π-linkers on the photophysical characteristics of D-π-A spacer derivatives and offered some helpful suggestions to create new organic materials for optoelectronic uses.