The metal oxide thin films, such as cadmium oxide (CdO) and zinc oxide (ZnO) thin films, were deposited by sol–gel-derived spin coating on glass substrates. The precursor concentration and post-deposition annealing were varied as parameters in the preparation. The prepared films were analyzed from the characterization techniques, such as X-ray diffraction (XRD), UV–visible spectrophotometer, photoluminescence (PL), and Hall Effect measurements. The XRD patterns showed cubic and hexagonal phase for CdO and ZnO, respectively. The improvement of the crystallinity of the films was observed for the variation of precursor concentration and annealing. The refractive index, extinction coefficient, and optical conductivity were calculated from the optical analysis. The bandgap of the CdO and ZnO films have been changed marginally with concentration and annealing. Both the metal oxide films showed band edge emission from PL study and its intensity increased with annealing. The higher crystallite size of film showed the lower electrical resistivity of CdO and ZnO thin films. The CdO and ZnO films have found to be higher crystallite size, absorbance, and carrier concentration. The results obtained from the analysis was suitable for optoelectronic devices.