The chemical reactions and pathways resulting in the formation of glycosaminoglycans, any of a group of polysaccharides that contain amino sugars.