The electromagnetic spectrum of neutron stars