I ask you to dinner and you stand me up. As a result I lose some money preparing extra food and I open a bottle of wine I might otherwise have kept for later.
You hire me to cater a dinner at your house and I prepare a fancy meal but when I get to your house to deliver the food nobody is home. The food goes to waste.
In one case I can sue for damages and in the other I cannot.
If someone stands you up for dinner that is not very nice but it is not a matter for the courts. But if you are a cater and someone doesn't pay you then you are are quite entitled to sue.
What's the difference?
In a word, contract.
If an agreement is something that the Courts will enforce that agreement is a binding contract. Lawyers use all sorts of special language to try to distinguish between social engagements, for example, and legally binding obligations. They speak of "offer, acceptance and consideration". Despite to fancy language the idea behind what is binding and what is not is fairly simple.
If you and I agree to do something and we intend it to have legally binding consequences we may have entered into a contract that can be enforced by a court. A dinner date doesn't amount to that sort of agreement but a catering arrangement does.
The form of agreement doesn't matter – a contract made orally is just as binding as a contract made formally with signed papers and lawyers (it may be harder to establish the terms of the oral contract but that's an evidentiary point).
That said there are a few requirements before an agreement can be binding.
First, there has to be a clear and complete agreement. If I say "I will sell you my snow machine for $800" and you say that's fine we have an agreement. But if I say "I will sell you my snow machine" and you say "sure but we'll figure out the price later" we don't have a deal.
Second, there must be value flowing from each of us for the agreement to be binding. If I promise to give you my snow machine as a gift and then I renege, there is no agreement to enforce. But if I say I'll give you my snow machine if you take me hunting and you agree we have a deal that is binding. The value of the exchange doesn't matter just so long as value of some sort flows.
Finally, both parties to the agreement have to be mentally competent and adults. A five year old cannot contract except through a parent or guardian. Someone who is roaring drunk can't contract. And someone who has been forced to make an agreement – the "sign here or I'll hurt you children" routine – is not bound (and that happens; I once had a case where someone signed a deal literally at gunpoint).
Basically an agreement, if clear and for something that isn't merely social, will be enforced by the courts.