My husband is on a dilaudid pump since he has cancer and at the point he can't sleep. Is this a side effect?

Not likely. Dilaudid usually causes pain relief and promotes a sleep state. However if you are not getting any pain relief and cannot sleep it is likely related to the underlying disease.
Maybe. It is not clear from your question if the Dilaudid was adminstered before or after you husband had trouble sleeping. I will assume that you are wondering whether the Dilaudid is causing his difficulty sleeping. Perhaps. Some people feel "jumpy" or agitated, and may need to try a different pain medication. I hope this helps you.
Probably not. While Dilaudid is a potent pain medication, however tolerance builds really quickly with dilaudid. The same dose of medication that worked a few days ago may no work again now and the body will require higher, higher and , much higher dose. He could not sleep may be related to the pain that is not well controlled or could be other causes - i.e. Depression, new environment- hooked up with pump etc.