I had this problem, and it ruined a whole crop. I ended up with an androgynous mess. Fortunately, they all seeded, so I got tons of seeds, all of which have subsequently been astounding plants.
As for the lights, I finally figured it out. This may, or may not, apply to your case, but the same thing was happening to me.
There were times when the light would not come on as expected. It seemed rare, but I have no way of knowing how often. Sometimes, I'd open the door, and the lights were on, sometimes not.
I have a time lapse camera in the room taking still photos twice a day to watch the growth over time. By the time I knew I had a problem, it'd been about a month and I had plenty of photos of blackness when I should have had light. I'm pretty sure the lights were cycling off, then on for the duration of the light phase.
I replaced the bulb. I replaced the ballast. I upgraded the ballast. I replaced the timer, even though it was the top rated timer for this sort of thing. I was told not to use an extension cord on the timer so I got rid of that. I did everything short of cutting open a chicken under the full moon and reading the entrails for clues. The guys at my local grow store were perplexed too, and I'm certain that they started to think that maybe I was a nut job.
Then, when I was bitching about why it wasn't working, the clerk started reading the bulb package and discovered that the type of bulb I had did not work with the type of ballast I had (electronic), even though it was a high end ballast, AND a high end bulb. He was shocked, and I could see it in his face. He was the one that upsold me on both the bulb and the ballast in the first place. He said he was unaware that the bulb wasn't rated for that ballast. As an aside, I was a little miffed that he didn't know that....shouldn't he have? Anyhoo....
Because of that, he fully refunded the cost of the bulb, and gave me at no cost a replacement. He replaced the high end bulb (400W Hortilux Super HPS) with a regular 400W MH Sun Master bulb. Granted, the new bulb wasn't as high end, or as expensive (around 80 bucks compared to over 120 for the Horilux) but it was totally fine for my needs.
Violia! No more outages. Not a single time has the bulb failed to fire when the timer instructed it to do so. And I finally got a great time lapse of my girls growing up.
So....get out the ballast specs, and review the specs of the bulb to make sure they are compatible. I had no idea that some bulbs wouldn't work with some ballasts and apparently the guys who should have known didn't either.
Hope that helps.