This is a big question. Nigeria is home to something like 500 languages and numerous ethnic groups. I don't know if there is an accurate or official count of traditional titles/rulers in Nigeria, but even a partial list numbers more than 100 titles.
The different societies had their own histories and trajectories in the pre-colonial era, which is why it is hard to give a uniform answer about all of the different rulers and titles in Nigeria today.
For some polities/titles, we can be certain that they existed before colonial rule. For instance, the Kano chronicle gives a detailed history of the succession of rulers from the 1300s to the 1800s. There are medieval arabic language accounts that mention Emirs of Zaria, Zamfara, Kano, Gobir, Kebbi. We also have detailed written chronicles of the history and rulers of Borno.
Ditto, in the south there are plenty of written observations from European traders and visitors about monarchs of Oyo, Benin, sometimes as well as mention of vassals in places like Ilorin, Ife, etc.
Now on the other hand, there is the experience of the Igbo peoples . Precolonial Igbo society distributed power in several different nodes, where priests/religious specialists could hold immense prestige and importance, village councils of elders could consult and debate issues of importance to the village. Successful merchants, both men and women, could gain immense wealth and with that wealth gain social distinction and be prominent voices in the community. It seems like there were Eze (kings) in this era, though there are ongoing debates about how inheritable the title was, what were the limits on power, etc.
And it is pretty clear that during the colonial era the British imposed a system of Warrant Chiefs on the Igbo, and that Warrant Chiefs had substantial despotic powers that were unlike the consultative and dispersed political traditions of the precolonial Igbo. This system of Warrant Chiefs came about because the British came in expecting to find rulers like those at Benin or Oyo, and elevated notable people to fill that role as Warrant Chief. Sometimes they were people who had the respect of their community, but sometimes the British passed over respected community leaders in favor of false claimants.
And there is possibly a third category where the past is obscure, there are very limited pre-colonial written records and little oral-historical work done, and it is just very hard to say what the nature of pre-colonial political organization was like.
Moses Ochonu wrote a book, Colonialism by Proxy, where he examined how societies in the middle-belt region which had not been part of the Sokoto Caliphate ended up lumped into the Northern Nigeria protectorate and how Hausa agents from the former Sokoto caliphate served to re-form the non-muslim societies in the Middle Belt region along the muslim Hausa city-state models in the North. According to Ochonu, this came about because the British had an anthropological ranking of civilizations, and they considered the Islamic society of the north "more civilized" than the animist societies of the middle belt, and British colonizers enlisted Hausa agents to "civilize" the middle belt along Islamic lines.
All of this is to say, histories of societies in this Middle Belt region like Tiv, Jukun, Nupe describe precolonial polities. However these societies get far less scholarly interest than the "big three" of Yoruba, Igbo and Hausa-Fulani social/political history.
Therefore, it gets very difficult to speak definitely about what precolonial Jukun political organization was like. We can read that they were part of the Kwararafa Confederacy (or Kwararafa kingdom?), but not much has yet been written about exactly how political power operated in Kwararafa polity. Edit: I have done some further looking, and I'm pleased to say that there are numerous doctoral theses from the last 10-15 years from Nigerian universities which have been digitized. These theses do address the topics of pre-colonial political organization of Tiv, Jukun people. If I keep looking, I expect to find more stuff about Afo, Nupe, etc precolonial organization. These Nigerian scholars are doing good work, and I need to do more reading, clearly. -edit.
And, with the experience of Hausa proxy agents of imperialism during the colonial era in mind, we can wonder if there hasn't been proto-nationalist re-imagining** of the past to create monarchies/kingdoms on par with the prestige of the emirates of the Hausa imperial agents.
How did their roles and status change under colonial rule and in postcolonial Nigeria?
British rule in Nigeria relied on a system of so-called "indirect rule" which sought to minimize British manpower and bureaucratic demands by incorporating customary rulers of African societies as intermediaries and as the face and hands and feet of colonialism in Nigeria.
Now, this varied a bit between Northern Nigeria, and the Southeast and Southwest of Nigeria.
The mastermind behind indirect rule, Lord Lugard, served for a term as Governor of Northern Nigeria and envisioned indirect rule as a way of maintaining the integrity of the social fabric in the muslim north against too-rapid modernization. Thus in the North the Emirs of the cities of the former Sokoto caliphate retained substantial despotic powers. And as I mentioned, Moses Ochonu has shown that Hausa imperial agents imposed political organization that mirrored the Emirates in the middle belt.
In the Southwest (yoruba areas) there was a substantial tradition of Christian missionary activity at least from the 1860s with bishop Samuel Ajayi Crowther. This missionary activity included substantial enrollment of christian convert children in mission schools, creating a pipeline of educated young people who served as clerks in the colonial bureaucracy.
There was a similar situation in Southeast (Igbo area) though missionary activity and conversion begins a little later. Still, there did develop an educated Igbo bureaucratic class by the time of independence similar to Yoruba experience.
One difference, however, was the imposition of the system of Warrant Chiefs which was alien to the political culture of Igbo society. Where in the pre-colonial era Igbo women could have important positions as merchant queens or wealthy notables, the Warrant Chief system sought to entrench power in the hands of men, and relegate women to domestic roles that English women of Victorian and Edwardian era had. This provoked substantial backlash from Igbo women, particularly during the "Women's War" aka the "Aba women's riots" in 1929 where women protested for the end of warrant chiefs and the recognition of clan heads named by the Igbo.
So, these different experiences during colonial era meant different trajectories after independence.
The Nigerian politician Ahmadu Bello was the leader of the Northern Peoples Congress in the 1950s and 1960s, and was a major political power in the independence era. At the same time, he was the Sardauna of Sokoto, a direct descendant and heir of Al Hajj Umar Tal and Ahmadu Bello. His illustrious princely title ensured his political importance and constituency in the north.
In contrast in the south, the mission educated bureaucracy took the lead in post-independence politics. Yoruba and Edo customary leaders like the Alafiin of Oyo, the Ooni of Ife, the Oba of Benin retained much community respect, and have often taken roles as philanthropists and unofficial community leaders. But, under the republic they hold no official political power as princes.
In Igbo territory, "customary rulers" including the Warrant Chiefs continued to have roles in regional and sub-regional government from the 1950s-1965, although there was a general trend towards political power moving towards the educated bureacratic class at the expense of these customary rulers. After the Nigerian Civil War, in 1975 there was a major advisory committee set up to delve into which customary leaders (ex warrant chiefs) were from legitimate claims, and who were false claimants during the colonial era. That commission ended up allowing communities to name their own customary leaders for recognition by the regional government.
Is Nigeria unique in having princes or are there other equivalents in West Africa?
There are other customary rulers, not only in West Africa.
In Uganda there is the kabaka of the Ganda kingdom, the kyabazinga of Soga kingdom, omugabe of Ankole, and rulers of Toro, Bunyoro and Rwenzururu.
In DRC and Zambia there is the mwata kazembe of the Kazembe kingdom. There is also the mwata msiri the ruler of the Kingdom of Garenganze (and descendant of Msiri).
There are many, many customary rulers across the continent, not only in Nigeria.
** Leroy Vail gives an example of this nationalist imaginary in The Creation of Tribalism in Southern Africa when he was told about the "Nkhamanga empire" while visiting Malawi in 1967. The Nkhamanga empire never really existed, but was a creation of a nationalist author in the 1930s.