A necessary condition for a preference relation to be represented by a utility function is that the preference relation is rational (where a "utility function" is a real-valued function that assigns a higher or equal numerical value to bundle A than to bundle B, when A is weakly preferred to B).
Preferences are rational when they are complete (I can express my preferences for all conceivable bundles), and transitive (If I weakly prefer A to B and B to C, then I weakly prefer A to C).
Given rationality, a sufficient condition is that the rational preference relation is continuous, i.e. if it is preserved under limits.
Then, the related utility function is also continuous.
Monotonicity is a property where we go from quantities to preferences, after assuming desirability ("goods" rather than "bads"). Local nonsatiation is actually the weaker assumption that is required for most of the theory.