It's a versatile greeting that can be used in many situations, from casual encounters to formal settings.
You can also use "Tēnā koe" which is more formal and literally means "Greetings to you".
For a group of people, you can use "Tēnā koutou" (greetings to you all).