Can I leave a garden hose under pressure for long periods of time?
It is certainly OK to turn off the water at the end of a hose for short periods. If you leave it on this way for long periods you are stressing the hose which could lead to a ruptured hose when you are not around. This could lead to a waste  of water or to water damage if the hose sprays on something.

In addition, this could lead to a leaking water valve because the stem packing will be under pressure. The usual valves have a seal around the rotating (multi-turn) stem, but if the valve is a "ball valve" (90 deg on-off), then this doesn't apply.

I think it is best practice to shut off the valve on the pipe when you are finished using the water.