Too narrow: they're just plain going to hurt. Depending on where they're too narrow, they could pinch your toes, hurt at the arch, or cause problems with your Achilles or ankle bones. Skating long-term in skates that are too narrow can cause permanent foot problems. I'm living proof. (Mine were figure skates, but I see no reason why too-narrow hockey skates wouldn't cause the same problems eventually).
Too wide: the biggest issue will be that your foot moves around in the skate and the friction will cause blisters. A lot of people whose skates are too wide end up "gripping" with their toes, clenching them to try and get their foot to feel more secure in the skate. This doesn't really cause permanent damage, but you're going to have really sore toes after skating. I've never had skates that are too wide- it took me a long time to find skates that were wide enough- but I bet others will be able to come up with more consequences.