In this study, we synthesized a novel compound, 3-(5-amino-1,3,4-thiadiazol-2-yl)-6-ethyl-4-hydroxy-2H-pyrano[3,2-c]quinoline-2,5(6H)-dione (ATEHPQ), through a condensation reaction between 6-ethyl-4-hydroxy-2,5-dioxo-5,6-dihydro-2H-pyrano[3,2-c]quinoline-3-carboxaldehyde and thiosemicarbazide, followed by oxidative cyclization. We characterized ATEHPQ using elemental analysis, IR, 1H and 13C NMR spectroscopy, and mass spectrometry. Density Functional Theory (DFT) calculations with the B3LYP/6-311++G(d,p) basis set were employed to optimize the molecular geometry and analyze global reactivity descriptors, including HOMO-LUMO energies. The Molecular Electrostatic Potential (MEP) map was used to identify reactive sites, and drug-likeness studies indicated potential pharmaceutical applications. Notably, ATEHPQ showed a higher first hyperpolarizability (βtot) compared to urea, suggesting its suitability for nonlinear optical applications. We also determined the Miller indices for ATEHPQ’s preferred orientations using a specialized program. Williamson–Hall analysis revealed an average crystal size of 26.08 nm and a lattice strain of 6.3 × 10−3. The thin films exhibited three distinct absorption peaks at 2.8, 3.41, and 4.21 eV, with a direct energy gap of 2.43 eV. Dispersion parameters from the single oscillator model provided oscillator and dispersion energies of 3.12 eV and 14.21 eV, respectively, with a high-frequency dielectric constant of 4.71. The ATEHPQ thin films, when combined with n-Si, demonstrated significant improvements in photovoltaic performance: the open-circuit voltage (Voc) rose from 0.13 V to 0.521 V, the short-circuit current (Isc) increased from 0.253 mA to 2.94 mA, the fill factor (FF) improved from 0.238 to 0.33, and the efficiency (η) grew from 0.71% to 4.64% with increased illumination intensity. These results highlight the excellent photovoltaic and photodetection capabilities of ATEHPQ thin films, underscoring their potential for advanced optoelectronic and solar cell applications.