We establish necessary and sufficient conditions for the discreteness of spectrum and strict positivity of magnetic Schrodinger operators with a positive scalar potential. They are expressed in terms of Wiener's capacity and the local energy of the magnetic field. The conditiions for the discreteness of spectrum depend, in particular, on a functional parameter which is a decreasing function of one variable whose argument is the normalized local energy of the magnetic field. This function enters the negligibility condition of sets for the scalar potential. We give a description for the range of all admissible functions which is precise in a certain sense. In case when there is no magnetic field, our results extend the discreteness of spectrum and positivity criteria by Molchanov [Molchanov, A. M. (1953). On the discreteness of the spectrum conditions for self-adjoint differential equations of the second order (Russian). Trudy Mosk. Matem. Obshchestva (Proc. Moscow Math. Society) 2:169-199] and Maz'ya [Maz'ya, V. G. (1973). On (p, l)-capacity, imbedding theorems and the spectrum of a self-adjoint elliptic operator. Math. USSR Izv. 7:357-387].