It refers to the state of being legitimate, which means being lawful, rightful, or genuine.
Here are some examples:
* The legitimacy of the government is being questioned. (The noun "legitimacy" is the subject of the sentence.)
* There is no doubt about the legitimacy of her claim. (The noun "legitimacy" is the object of the preposition "about".)
* They are working to ensure the legitimacy of the election process. (The noun "legitimacy" is part of a noun phrase acting as the object of the verb "ensure".)