We characterize the Leavitt path algebras over arbitrary graphs which are weakly regular rings as well as those which are self-injective. In order to reach our goals we extend and prove several results on projective, injective and flat modules over Leavitt path algebras and, more generally, over (not necessarily unital) rings with local units.