This study reports synthesis of silver nanoparticles (AgNPs) in various solvent media namely, ethanol, propanol, acetone, ammonia, water, and N-Methyl-2-Pyrrolidone (NMP) by chemical and biosynthesized routes. The impact of solvent on the optical and structural characteristics of AgNPs were studied by using UV–Vis spectrophotometer and X-ray diffractometer respectively. AgNPs prepared via chemical route in the solvents water, NMP, and ethanol displayed significant absorbance peaks between 400 and 450 nm hinting formation of NPs. Meanwhile, in case of AgNPs prepared via biosynthesized route using Ocimum sanctum leaves extract, in solvent water, ethanol, acetone, and NMP, there emerged absorbance peaks between 400 and 470 nm. Furthermore, the silver precursor in NMP solvent without any reducing agent showed prominent absorbance peak at around 429 nm. XRD peaks provided confirmation of the crystalline nature of AgNPs exhibiting Face Centred Cubic (FCC) structure. The effect on optical properties were also studied by altering the pH before and after the synthesis. In essence, the study provides valuable insights into preparation of AgNPs using different solvents and pH conditions, which could be useful in various fields such as sensing, medicine, electronics, and catalysis.