You should avoid #pragma wherever possible. #pragma compiler directives are always compiler specific and therefore non-portable. They should be regarded as a last resort.
Moreover, the ISO required behaviour for a compiler that encounters an unrecognised pragma is to simply ignore it. This it may do silently without warning, so if the directive is essential to the correct operation of your code, it may compile but fail to run as expected when compiled with a different compiler. GCC for examples uses very few pragmas, and primarily only for target specific compiler behaviour or compatability with some other compilers. Consequently if you want to ensure portability you end up with constructs like:
#if _MSC_VER
#pragma PACK(push,1)
#elif __GNUC__
// nothing to do here
#else
#error "Unsupported compiler"
#endif
struct sPackedExample
{
// Packed structure members
#if _MSC_VER
} ; // End of MSVC++ pragma packed structure
#pragma pack (pop)
#elif __GNUC__
}__attribute__((__packed__)) ; // End of GNU attribute packed structure
#endif
It is a mess, you rapidly cannot see the wood for the trees and the problem becomes worse as you add support for more compilers (which in turn requires knowledge of the pre-defined macros identifying the compiler.
[note:]GCC 4.x does in fact support #pragma pack for MS compatibility, so the above example is somewhat contrived, but this is not true of earlier versions of GCC that may still be in use, or other compilers.
'#pragma once' is particularly problematic, since for a compiler that does not support it, the code will in all but the most trivial cases break when preprocessed. The more verbose but portable solution should be preferred. Visual C++'s application and code generation 'wizards' may use it, but often such code is non-portable in any case. You should be aware when using such code that you are essentially locking your project into Microsoft's tools. This may not be a problem, but I would not recommend using the directive in your own code.
To address your original question: "What code have you written with #pragma you found useful?"; you should rather be considering useful ways of avoiding pragmas perhaps?
It should not perhaps be a question of "usefulness" but rather "necessity". For example a number of embedded systems compilers I have used, use #pragma directives to specify that a function is an interrupt service routine, and therefore has different entry/exit code, and in many cases operates on a different stack. Avoiding such a pragma would require knowledge of the target's assembler language, and would be less efficient when C code is called to handle the interrupt.