It's a polite greeting used in various contexts, and its literal translation depends on the time of day.
* Morning: "Bonjour" is a standard greeting.
* Afternoon/Evening: While technically correct, "Bonjour" is less common. "Bonsoir" (good evening) is more appropriate.