It's not a bad simile because as long as it compares two unlike things using "like" or "as", then you should be fine. However there is a difference (at least in my head) of similes that are worded well and worded poorly. Yours wasn't worded poorly, but I think that it could be better. I'm not trying to put you down and you don't have to do what I suggest or anything like that if you don't want to. Just hear me out for a bit.
What I like about this phrase is that it carries quite a bit of emotion. It makes it seem as if the phrase is explaining a jarring thing that is powerful and very noticeable (correct me if I'm wrong). The feel for it is very strong. Your word choice is great!
The only problem that I personally have is that even though the feeling I get from it is strong, it doesn't really give me a strong visual in terms of comparison. I can sorta see what you mean, but I got a bit confused about the "ominous darkness" part. Did you mean that the lightning clashed just like how broken shards of glass would in ominous darkness or did you mean that the lightning clashed in ominous darkness just like how broken shards of glass would? Maybe it's just me being weird, but I sorta found it a bit ambiguous. But I do hope that you meant the second one (lightning in ominous darkness clashing like shards of glass) because that one makes the most sense.
So the point is to not get too wordy and carried away with your simile that it muddies up the meaning. But if you don't want to change it too much and still want to keep the words you have now (which I personally would do since I love your word choice), try to rearrange your words and/or appropriately add commas (so many people have trouble with this, even I make a lot of those mistakes especially in informal writing) in order to prevent such ambiguity.
I hope this helps and you get what I mean :)