Niue adopted its flag on October 15, 1975, the year the island became self-governing in free association with New Zealand. Before that it flew the Union Jack.
How the flag came about
Niue became a responsibility of the Governor-General of New Zealand in 1901, and a version of that relationship still holds: the island governs itself but relies on New Zealand in several areas. The flag arrived as part of the legislation that established self-government, and its design was debated in the Legislative Assembly, which had to weigh the existing ties against the island's new status. Other national symbols followed at around the same time.
Yellow, and a Union Jack full of stars
The field is golden yellow, for the Pacific sunlight and for the warmth of the people who live there. The Union Jack sits in the upper hoist, a record of the decades of British administration.
What makes the flag unusual is what has been done to that Union Jack. A large star at its center stands for Niue itself, and four smaller stars around it form a diamond, marking Niue's constitutional link with New Zealand and its own measure of independence. Yellow is a rare choice for a field, and between the color and the stars, the colonial emblem ends up altered rather than simply inherited.
Flying it
The flag is displayed on national holidays and official occasions, at government buildings, and at cultural events including Constitution Day. It should not touch the ground or be put to improper use. Abroad it usually appears alongside the flags of New Zealand and the United Nations, which is a fair picture of Niue's political position.
Union Jack relatives
Australia and New Zealand carry the Union Jack for much the same colonial reasons, but neither looks much like Niue's flag. The yellow field and the arrangement of stars are Niue's alone.
References
[1] Government of Niue. "National Flag of Niue." gov.nu
[2] Flag Research Center. "Flags of Oceania." flagresearchcenter.com
[3] New Zealand Archives. "Records of Niue." archives.govt.nz