It's a sweet and affectionate phrase that is commonly used to wish someone a good night, especially a romantic partner.