Nitrogen plasma-assisted molecular beam epitaxy (PAMBE) deposited GaN thin films on (111) n-type silicon substrate with different thickness AlN buffer layers are investigated and distinguished by X-ray diffraction (XRD), atomic force microscopy (AFM), scanning electron microscopy (SEM) and Raman scattering. The thickness of AlN buffer layer ranged from 200 nm to 300 nm. Besides that, the electrical characteristics of the GaN thin film for ultraviolet detecting utilizations are studied by calculating the photo current/dark current ratio on a metal-semiconductor-metal (MSM) photodiode with and without the illumination of Hg-lamp source. The devices have been tested over room temperature (RT). The photocurrent analysis, together with the study of Schottky barrier height (SBH) development, ascertain that the principal mechanism of photo transport is thermionic emission. The photocurrent value is rigorously dependent on Schottky barrier height. The GaN/AlN(200 nm)/n-Si MSM photodiode produces the highest photo/dark current ratio for the lowest strain that consists of the GaN film grown on the AlN (200 nm) buffer layer.