The two main acids in Sprite are citric acid and malic acid. These are used for both a sour flavoring as well as food preservation.
Citric acid is an organic acid. It is found in citrus fruits, from which it gets its name. Citric acid is used in human metabolism, and it is also an antioxidant. It helps give Sprite the sour flavor for which it is known.
Malic acid is commonly found in certain wines and fruits, particularly in apples. It also plays a role in human metabolism. It is added to drinks to give them a tart taste.