This document discusses a study on the geometrical, electronic, spectral, and nonlinear optical (NLO) properties of Allium cepa dye for use in solar cell applications. The dye's structure was optimized using density functional theory (DFT) with the B3LYP functional. Its electronic properties, including frontier orbital energies and density of states, were then analyzed. The dye's polarizability and hyperpolarizability were also calculated, showing potential for NLO applications. Finally, its electronic absorption spectrum was simulated using time-dependent DFT (TD-DFT) in both vacuum and solvent environments, identifying optical transitions that could enable photoinduced electron transfer in dye-sensitized solar cells. The results indicate Allium cep