A lot is known about the Hölder regularity of stochastic processes, in particular in the case of Gaussian processes. Recently, a finer analysis of the local regularity of functions, termed 2-microlocal analysis, has been introduced in a deterministic frame: through the computation of the so-called 2-microlocal frontier, it allows us in particular to predict the evolution of regularity under the action of (pseudo-)differential operators. In this work, we develop a 2-microlocal analysis for the study of certain stochastic processes. We show that moments of the increments allow us, under fairly general conditions, to obtain almost sure lower bounds for the 2-microlocal frontier. In the case of Gaussian processes, more precise results may be obtained: the incremental covariance yields the almost sure value of the 2-microlocal frontier. As an application, we obtain new and refined regularity properties of fractional Brownian motion, multifractional Brownian motion, stochastic generalized Weierstrass functions, Wiener and stable integrals.