Land is a vital component of nature around the world and is essential for humans, terrestrial plants, and animals. However, urbanization is growing worldwide and the groundwater quality in urban areas is declining due to rapid development, industrialization, and pollution. Hence, it is important to determine the hydrogeochemistry and changes concerning land use and land cover (LULC). This study was conducted to investigate the hydrogeochemical mechanism of Sargodha, one of Pakistan’s fastest-growing cities, during 2015 and 2021 under two different LULC indices named normalized difference vegetation index (NDVI) and normalized difference built-up index (NDBI). Forty-eight groundwater samples were collected in 2015 and 2021 to assess groundwater quality for domestic use and irrigation. The Piper diagram revealed that (Ca2++Mg2+–HCO3−+CO32−) and (Na++K+–SO42−+Cl−) were the main components of hydrogeochemistry in both years. The Gibbs plot and silicate weathering of groundwater samples indicated that rock dominance and silicate weathering played a major role in aquifers. Additionally, the results showed that 4% of the groundwater in 2015 and 21% of the groundwater samples in 2021 were unfit for human consumption. However, 37% and 40% of samples were considered not fit for irrigation in 2015 and 2021, respectively. The LULC, NDVI, and NDBI clearly revealed higher urban areas in 2021 compared to 2015. The relationship between groundwater parameters and land use land cover indices (NDVI and NDBI) explained that none had a major relationship. The non-carcinogenic risk showed health quotient HQ < 1, indicating no severe health risk due to nitrate (NO3−) exposure in the city. The current study suggests conducting future investigations considering a larger scale to recommend efficient management strategies, urbanization planning, and ensuring safe irrigation and drinking water to prevent groundwater pollution.