The present work reports on the optimization of substrate temperature, molar concentration and volume of the solution of nickel oxide (NiO) thin films prepared by nebulizer spray pyrolysis (NSP) technique. NiO films were optimized and characterized by XRD, SEM, EDX, UV-Vis and I-V measurements. Based on XRD analysis, the molar concentration, volume of solution and substrate temperature of the prepared NiO films were optimized as 0.20 M, 5 mL and 450 °C for P-N diode applications. The XRD pattern of the optimized NiO film revealed cubic structure. The surface morphological variations and elemental composition were confirmed by SEM and EDX analysis. The optical properties were studied with UV-Vis spectrophotometer and the minimum band gap value was 3.67 eV for 450 °C substrate temperature. Using J-V characteristics, the diode parameters: ideality factor n and barrier height Фb values of p-NiO/N-Si diode prepared at optimum conditions, i.e. 450 °C, 0.2 M, 5 mL, were evaluated in dark and under illumination.