Structures of pyridinium-based ionic liquids containing 1-methylpyridinium [MP]+, 1-ethylpyridinium [EP]+ and 1-propylpyridinium [PP]+ with halide anions (X) where X = Cl−, Br− and I− were studied using density functional theory and the most stable structures of these ionic liquids were compared. Then electronic and structural properties were extracted for the desired liquids. The results show that in the most stable conformers, in these ILs, Cl− and Br− anions prefer to be placed almost in the plane of the pyridinium ring, while I− prefers the position almost vertical to the plane of the pyridinium ring. In order to investigate the hydrogen bonds between molecules by atoms in molecules (AIMs) and natural bonding orbital (NBO) were studied. The calculated thermodynamic functions show that the interaction of the cation–anion pair in ionic liquids containing Cl− and Br− anions is greater than I−, and these interactions decrease with the increase in the atomic weight of the halide. Molecular orbital theory has also been used to calculate quantities related to their stability and activity. Also, ionic liquids containing iodine anion have a high dipole moment compared to ionic liquids containing chloride and bromide. The results of this study show that the properties of Any ILs can be controlled by choosing the appropriate anions.