Just like anything there is no strait forward answer or calculation, partly because everyone has a different opinion on games and because they are so diverse in nature. When assessing if you got your money's worth there are few factors that must be considered.
Time Spent Playing
Most commonly, game time is tracked in hours of game play. Typically in terms of hours, I generally like to consider one hour of game play equal to one dollar, quite literally making the phrase "time is money" apply to this situation. For example. I own the game Space Engineers and have 'played' the game for 524 hours. Yes that's a long time, almost 22 straight days, but at least a quarter of them are away from keyboard hours. Does that mean I want to pay 524 dollars for the game? Of course not, especially considering I paid $20, it just means the purchase was certainly worthwhile.
Achievements and Bonus Content
How many achievements does the game have? Did the developer even take the time to make achievements or were they more interested in cutting corners? Any bonus content and achievements take time to create, if the game wasn't worth it to the developer why should it be worth it to you? More importantly, if the game has a workshop on steam or mods made for it, then it's a good enough game for mod developers to put their own time into the game for your benefit. A game with mods is almost always worth the price tag.
If you own multiple consoles and a PC chances are you've ended up buying a game more than once. Did you enjoy the story/campaign the first time? Would you play it again? Personally, the answer is usually no, no matter how fun the original play through may have been the first time, at some point it starts to feel like a grind and that is when usually stop playing. This is more circumstantial than the other topics, sandbox games are always usually repayable due to the freedom of choice and not being forced to follow a linear story or campaign. Id much sooner start a From the Depths campaign than the Call of Duty story mode.
Arguably the most important topic to consider would be the price. If you purchased the game on sale you're already off to a good start, better yet, if you got it for free...why are you even here? Don't be afraid to buy a game used, as long as the disk is not damaged it'll play just as well.
A few other things to consider would be a friend's recommendation, games are always more fun when playing with friends. Also, useful knowledge gained is important. I learned a bunch things about space, chemistry, metals, and etc. from playing Space Engineers.
Thanks for reading! What makes a game worth it to you? Leave a comment and let us know.