Electronic and optical properties of nanostructures formed by monolayer of molybdenite and with adsorption of alkali metals (Li, Na, K, Rb, Cs) and halogens (F, Cl, Br, I, At) on MoS2 are investigated by using the first principle calculations based on the density functional theory (DFT). The results suggest strong absorption peaks for pristine MoS2 in certain regions of the visible portion of the spectrum (-380-470 nm) and in the entire ultraviolet region. Structures formed by adsorption of Li, F, Cl, Br, I on MoS2 contribute to the red shift phenomenon where absorption peaks are seen to shift towards the lower energy range of the spectrum. However, a blue shift phenomenon is seen in other structures formed by the adsorption of At, Na, K, Rb, Cs over MoS2, where absorption peaks shift to higher energy range of the spectrum. Furthermore, high absorption is observed in the entire visible region (-400-790 nm) and UV region (below 360 nm) of the spectrum for all the adsorbed nanostructures. The measured dielectric constant is in line with the measured refractive index for all the adsorbed nanostructures.