A Christmas lights switch on in the US was cancelled after a gunman opened fire on the crowd, leaving four people injured.