In economics, the term is used to describe one of the major functionalities of money, which is related to its ability to measure the value of a particular property, good, or service. This is what allows us to evaluate a wide range of distinct products and compare then in monetary values, based on a specific currency, such as the US dollar, the British Pound, or the Euro.
So in the same way that we use centimeters (cm) to measure distance or length, we use a unit of account to gauge the monetary value of pretty much anything. Such a property of money enables us to compare, for instance, the value of a car with the value of a house. Or to compare the price of apples and oranges - even though they are quite different. In other words, money is used as a unit of account because it evaluates almost everything we produce and consume.
Also, this property is what grants money the ability to be lent and borrowed, and also what enables us to perform mathematical operations - for instance, when calculating profits, losses, and income. In other terms, a unit of account is what gives meaning and numerical values to the things we produce, trade, and consume.
But the value of money in real life is quite unstable due to inflation, deflation, and other economic phenomena. Due to that, money is not always considered a good unit of account as its ability to measure the value of things is not always the same. To understand this problem, imagine if the unit of a centimeter (cm) wasn’t able to remain constant over time. Then the centimeter as a unit would become less and less useful to measure distance or length.
In contrast to the traditional definition in economics, the term unit of account in the context of financial accounting refers to the description of a particular asset or liability that is reported in financial statements. Sometimes these are also referred to as a unit of measure, which is related to the monetary unit that is being used (e.g., the US dollar). So in this case, a unit of account is simply the money (currency) used for accounting.