Before the reformation in Renaissance Europe, Christian theologians used to ponder this question in all seriousness. The logic of the argument was this:
Angels exist. They are present in the world. We cannot see them. Why? Because they are clearly too small to be seen with the mortal eye. Angels possess great power (they performed miracles). Thus: What is the physical size of an angel? Since they are so minutely small, we must have a reference point. So: How many angles can dance on the head of a pin?
British Gazette answer: It depends upon two factors: How small are the angels? and, How big is the pin?
Since the reformation the phrase has come to mean to carrying on a meaningless debate about irrelevant issues. A splendid example of is this quote from the Interagency Working Group on Social Cost of Carbon – a quango of the U.S. Government:
“The purpose of the ’social cost of carbon’ (SCC) estimates presented here is to allow agencies to incorporate the social benefits of reducing carbon dioxide (CO2) emissions into cost-benefit analyses of regulatory actions that have small, or “marginal,” impacts on cumulative global emissions.”
Under Executive Order 12866, February 2010
Incidentally, the Italians have a couple of similar phrases:
“Stiamo parlando di aria fritta” Meaning (approximately), “We are debating about nothing”
Also, to keep with the angelic theme: “Discutere del sesso degli angeli.” Meaning, To discuss about the sex of the angels.