Accurate atmospheric parameters and chemical composition of planet hosts play a major role in characterizing exoplanets and understanding their formation and evolution. Our objective is to uniformly determine atmospheric parameters and chemical abundances of carbon (C), nitrogen (N), oxygen(O) and alpha-elements-magnesium (Mg) and silicon (Si), together with C/O, N/O and Mg/Si abundance ratios for planet-hosting stars. Through this analysis, we aim to investigate the potential connections between stellar chemistry and the presence of planets. Our analysis is based on high-resolution spectra of 149 F, G and K dwarf and giant stars hosting planets or planetary systems. The spectra were obtained with the Vilnius University Echelle Spectrograph (VUES) on the 1.65 m Moletai Observatory telescope. The determination of stellar parameters is based on a standard analysis using equivalent widths and one-dimensional, plane-parallel model atmospheres calculated under the assumption of local thermodynamical equilibrium. The differential synthetic spectrum method was used to uniformly determine the carbon C(C2), nitrogen N(CN), oxygen [OI], magnesium MgI, and silicon SiI elemental abundances as well as the C/O, N/O and Mg/Si ratios. We analysed elemental abundances and ratios in dwarf and giant stars, finding that [C/Fe], [O/Fe], and [Mg/Fe] are lower in metal-rich dwarf hosts while [N/Fe] is close to the Solar ratio. Giants show smaller scatter in [C/Fe] and [O/Fe] and lower than the Solar average [C/Fe] and C/O ratios. The (C+N+O) abundances increase with [Fe/H] in giant stars, with a minimal scatter. We also noted an overabundance of Mg and Si in planet-hosting stars, particularly at lower metallicities, and a lower Mg/Si ratio in stars with planets. In giants hosting high-mass planets, nitrogen shows a moderate positive relationship with planet mass. C/O and N/O ratios show moderate negative and positive slopes in giant stars, respectively. Mg/Si ratio shows a negative correlation with planet mass across the entire stellar sample.