Sleeping bag liners serve two main functions. The first is an extra layer of insulation, which allows the sleeping bag's thermal comfort to extend to slightly lower temperatures. The second is protection against getting the sleeping bag dirty. The liner is easier to wash than the sleeping bag itself.
Frequent washing harms the sleeping bag, so it is good to protect it from getting dirty. While from the outside a bivy bag can serve as effective protection for the sleeping bag, on the inside you can use a sleeping bag liner, thanks to which you don't have to worry so much about being dusty and dirty after a day of hiking.
With sleeping bag liners, however, you kill two birds with one stone. Thanks to them, your sleeping bag can be more versatile. A model that you previously could only take with you on the warmest summer nights can now handle slightly lower temperatures during early autumn.
Sleeping bag liners are made from materials that are pleasant to the touch and effectively wick moisture away from the body. You don't have to use them only in combination with a sleeping bag, but also on their own.
They can serve as an emergency sleeping bag when staying in warm areas or as a hygienic supplement to the bedding in accommodations where cleanliness of the bedding is not taken care of properly. Conversely, in some alpine huts, the use of hygienic liners is even prescribed.