Is the glass half full or half-empty?
The safest thing to do when you're unsure about hyphenating is to look the words up in a dictionary. For example, the Oxford English Dictionary generally recommends hyphenating half-full when it comes before a noun and not hyphenating it otherwise, but the dictionary also shows exceptions. It's also common for published and in-house style guides to have a list of compound words that should be hyphenated. For example, The Chicago Manual of Style has a long guide to hyphenation and states that most compounds that begin with the word half are hyphenated when they come before nouns. So, my advice is to check a dictionary or style guide, but if you don't have one handy, follow the rule that you hyphenate compound modifiers when they come before a noun, and don't hyphenate them when they come after a noun.
Here's another example:
They were in a long-term relationship. (In that sentence, I hyphenated long-term because it comes before the noun relationship. Long-term is a compound adjective that modifies the word relationship.)
Their relationship was long term. (No hyphen. I didn't hyphenate long term because it comes after the noun.)
Hyphens Can Change a Sentence's Meaning
Sometimes it is especially important to hyphenate the compound modifier because words can mean different things depending on the hyphenation. When you hyphenate the words, you are applying them as a single unit to the noun.
For example, there's a difference between a hot-water bottle with a hyphen and a hot water bottle without a hyphen. When you hyphenate hot-water, you're making it a single compound modifier that applies to the word bottle. It's a bottle for holding hot water. But when you don't hyphenate hot water, the words are separate modifiers and you're describing a water bottle that is currently hot.
A hot-water bottle is a bottle for holding hot water.
A hot water bottle is a water bottle that is hot.
Always consider whether hyphenation will affect your meaning.