Simple syrup is essential to any bar, easy to make, and keeps for a goodly amount of time. It can be made with equal parts (by mass) of sugar and water, or in a 2:1 sugar/water ratio for what is usually called rich simple syrup. The two elements can be combined and agitated for cold-processed simple syrup, or they can be heated until the sugar dissolves (which does not give you as dense a solution, because the sucrose disaccharides break down into monosaccharides).
In cocktails, sugar acts to balance out acidity and tamp down the burn of the alcohol. In the form of syrup it also increases the viscosity of the drink, generally resulting in a more enjoyable mouthfeel.
A concentrated sugar syrup can also, through the process of osmosis, pull flavor out of fruits and herbs. Water-soluble compounds can be extracted from spices and other dry botanicals. Performing this at higher temperatures speeds the chemistry, which is why my recipes for flavored syrups call for heating the sugar solution first.