In organic chemistry D and L notations are used specifically in sugars and amino acids. In sugars the position of the hydroxyl group at second last carbon determines whether it is D sugar or L sugar. If the hydroxyl group is on the right side on that carbon then it is called D-sugar if it is on the left side, then it is named L-sugars. In amino acids only, glycine is achiral remaining all amino acids are chiral, and their configuration is determined by the location of amino group (-NH2) on alpha carbon of amino acid, if it is on right side it is called D- amino acid and if it is on left side then it is called L-amino acids. All the chiral amino acids obtained from proteins have L configuration.
Capital “D” and “L” notations has no connection with small “d” (dextro) and “l” (levo) notation which are used to represents dextrorotatory and levorotatory compounds in organic chemistry.