Fish need sleep in order to recharge their bodies and battereis, just like people do. They can probably sleep with the lights on, but sleep is always better when it's dark - so the body can produce those sleep harmones, of which I forget the name right now.
I don't think koi sleep as much or as deeply as other fish. I know that mine do some mighty mysterious things during the dark hours. I have some floating baskets in the pond, to house plants and keep their roots safe from the koi. Not infrequently, in the morning, I will find that a koi has jumped high and far enough to land himself inside one of these baskets. This has never happened during the daylight. So, whether they're playing or catching night-bugs or just getting exercise, there is a lot going on at night that doesn't happen during the day.