Money has an absolute value. If you hold a bill, there is a number printed on it, which is determining its value. However, depending on the way you earn money and your financial goals, its actual value for you changes and it becomes all perception.
Say you work for an hourly wage. Then each Euro you spend corresponds to an amount of time you have to work for it. When trying to save, you can always ask yourself, whether the thing you want to buy is worth the amount of time you need to earn that specific amount. This is a straightforward calculation. If something gives you several hours of pleasure or utility but only costs a fraction of the time working, it is a good deal, especially if you enjoy your line of work. A good pen, computer or other things improving your quality of life for a long time are almost always a good investment. That chocolate bar for one Euro in the cafetaria probably not, unless you really need to cram in some calories and it becomes a necessity.
However, this calculation changes if you already have decoupled parts of your income from your time. The simplest way to achieve this is start investing. For example, if you can build a portfolio which yields about 5% per year, a part of your income becomes a function of your net worth. Assuming you are fully invested, a Euro spent corresponds to a net loss of 20 Euro in that year, or you might do some more complicated calculations and distribute this loss over the years to come. However, probably you are not fully invested and have some time dependent income. Then you might split the amount and some percentages corresponds to time spend, some corresponds to a net loss. Or you are trying to build capital, but leave 50% of your money in relatively secure saving accounts, with interest rates barely beating the inflation. So then the function is not 5%(net worth), but 2.5%(net worth), so a Euro spent corresponds to a net loss of 40 Euros for that year.
Of course this does not cover all possibilites, but it shows that the value of money to you is something quite arbitrary, resulting in different heuristics. As it is arbitrary, you might as well choose a valuation model which supports your personal and finance goals. As you probably want to save money, increase your net worth and cut down on indulgences, you can make the perceived value of some things quite large in this way. Its easy to rationalize spending one Euro or something like five minutes of work on a chocolate bar, however, if you think of it costing you 20 or even 40 Euro, you are much less likely to indulge.
Also this does not only apply to money. How you value your time and certain actions is also based on your own perception. Idling on the internet might count as easy entertainment, or as a huge loss in time you could spend working out, studying or with your loved ones.
There is a caveat though. You should not put a price tag on thinks you truly love doing, as there seems to be a negative effect on your internal motivation, as soon as regular external motivators come into play.