Three new knot invariants are defined using cocycles of the generalized quandle homology theory that was proposed by Andruskiewitsch and Gra~na. We specialize that theory to the case when there is a group action on the coefficients. First, quandle modules are used to generalize Burau representations and Alexander modules for classical knots. Second, 2-cocycles valued in non-abelian groups are used in a way similar to Hopf algebra invariants of classical knots. These invariants are shown to be of quantum type. Third, cocycles with group actions on coefficient groups are used to define quandle cocycle invariants for both classical knots and knotted surfaces. Concrete computational methods are provided and used to prove non-invertibility for a large family of knotted surfaces. In the classical case, the invariant can detect the chirality of 3-colorable knots in a number of cases.