Entangled states underpin many quantum applications including cryptography, logic devices, imaging and sensing. Recent demonstrations of interference between single plasmons reveal the potential for construction of quantum plasmonic circuits, which would further benefit from the integration of quantum sources. We develop a versatile theoretical framework of photon generation through spontaneous wave mixing in arbitrary nonlinear plasmonic and metamaterial nanostructures. Our quantum approach is rigorously based on the electromagnetic Green functions and fully takes into account material absorption and dispersion, providing for the first time accurate predictions of the experimentally measurable photon counts, spatial correlations, and degree of entanglement. We consider specific numerical examples of metallic layer on a nonlinear substrate and nonlinear hyperbolic metamaterial. In these structures, the spontaneous four-wave mixing process leads to generation of entangled plasmon pairs as well as photons entangled with plasmons. We also demonstrate a general one-to-one correspondence between spontaneous parametric downconversion process and sum frequency generation. This allows one to use the current rapid progress in nonlinear metamaterials to optimize structures for entangled photon generation.