We develop a formalism for the calculation of the macroscopic dielectric response of composite systems made of particles of one material embedded periodically within a matrix of another material, each of which is characterized by a well-defined dielectric function. The nature of these dielectric functions is arbitrary, and could correspond to dielectric or conducting, transparent or opaque, absorptive and dispersive materials. The geometry of the particles and the Bravais lattice of the composite are also arbitrary. Our formalism goes beyond the long-wavelength approximation as it fully incorporates retardation effects. We test our formalism through the study of the propagation of electromagnetic waves in two-dimensional photonic crystals made of periodic arrays of cylindrical holes in a dispersionless dielectric host. Our macroscopic theory yields a spatially dispersive macroscopic response which allows the calculation of the full photonic band structure of the system, as well as the characterization of its normal modes, upon substitution into the macroscopic field equations. We can also account approximately for the spatial dispersion through a local magnetic permeability and analyze the resulting dispersion relation, obtaining a region of left handedness.