If you have any real plants in the tank, then keep the lights on for 10 - 12 hours each day. If you dont have any real plants, then its up to you; you can leave them on all day (which is preferred by most) or you can just put them on for a little bit when its semi dark so you can see your fish better, and once it brightens up you could turn it off if you feel like it.
As for the fish going ballistic, its probably a big shock to go from bright, to sudden darkness, and vise versa, so if you light the surrounding room first, then turn off the tank light, then the room light, they shouldnt get as scared from the sudden change
HTH