We present the spectral energy distributions (SEDs) of a hard X-ray selected sample. The sample contains 136 sources with F(2-10 keV)>10^-14 erg/cm^2/s and 132 are AGNs. The sources are detected in a 1 square degree area of the XMM-Newton-Medium Deep Survey where optical data from the VVDS, CFHTLS surveys, and infrared data from the SWIRE survey are available. Based on a SED fitting technique we derive photometric redshifts with sigma(1+z)=0.11 and 6% of outliers and identify AGN signatures in 83% of the objects. This fraction is higher than derived when a spectroscopic classification is available. The remaining 17+9-6% of AGNs shows star-forming galaxy SEDs (SF class). The sources with AGN signatures are divided in two classes, AGN1 (33+6-1%) and AGN2 (50+6-11). The AGN1 and AGN2 classes include sources whose SEDs are fitted by type 1 and type 2 AGN templates, respectively. On average, AGN1s show soft X-ray spectra, consistent with being unabsorbed, while AGN2s and SFs show hard X-ray spectra, consistent with being absorbed. The analysis of the average SEDs as a function of X-ray luminosity shows a reddening of the IR SEDs, consistent with a decreasing contribution from the host galaxy at higher luminosities. The AGNs in the SF classes are likely obscured in the mid-infrared, as suggested by their low L(3-20micron)/Lcorr(0.5-10 keV) ratios. We confirm the previously found correlation for AGNs between the radio luminosity and the X-ray and the mid-infrared luminosities. The X-ray-radio correlation can be used to identify heavily absorbed AGNs. However, the estimated radio fluxes for the missing AGN population responsible for the bulk of the background at E>10 keV are too faint to be detected even in the deepest current radio surveys.