Do optimization problems written in argmax form represent a function? If I write 
$$\hat{x} = \underset{x}{\text{argmax}}\ f(x,y)$$
can I assume that what is to the right hand side (RHS) of the equal sign is a function in the rigorous sense of the word? Under what conditions does the RHS represent a function, i.e. $\hat{x} = g(x,y)$ for some function $g$?
 A: To view argmax as a function, other than the trivial "constant" function, you would need to make it a function of one or more arguments, which could be, for instance, input data specifying a particular instance of a class of optimization problems.  In your case, y could be the input data, i.e., the argument of the argmax function. But the optimization variable x, would not also be an argument of the argmax function (other than in a trivial sense).
Argmax may not exist. For instance, sup may exist, but not max (you can fix that deficiency by changing to argsup instead of argmax).  Also, the optimization problem may be infeasible, in which case the argmax does not exist.
Argmax itself needs to be clarified as to whether it means an argument value which is a global maximum, or whether it could be a local maximum which is not a global maximum.
And generally (even if argmax is defined to mean only a solution which is a global maximum), it could be a multivalued function, because there may be more than one argument value achieving the global maximum.
If you view the maximum (or sup) objective value as a function, some of these problems go away, for instance, an infeasible maximization problem can be, and customarily is, defined to have optimal objective value = $-\infty$. Also, globally optimal objective value will be unique, even if more than one argument value achieves it. Although optimal objective value would be multivalued if you allow local as well as global optimal objective values.
Some of these matters go away for certain classes of optimization problems, such as convex (local vs. global), strictly convex objective (uniqueness of optimal argument value). For clarification purposes, in this context, convex means when viewed from the perspective of the equivalent minimization problem, i.e., that the objective function being maximized is concave, and the constraint region is convex.
