Question: I was installing shelving in my closets, when drilled a hole into studs, the lights flickered momentarily for 2 seconds. 

I stopped drilling, and everything else seems fine now. The circuit didn't break and the lights are no longer flickering.

There doesn't seem to be any sockets around the switch. 

Should I call an electrician or is there anything I should test?

Answer: 
So you stopped drilling and it got better. Of course, if you put in a screw it might get worse in a hurry. 

Best bet is that you nicked the insulation on a wire or wires - either from drilling too deep, determinedly drilling though something that was supposed to prevent you (or warn you by being difficult to drill, compared to wood anyway) from drilling into it, or because it was installed improperly (too close to the surface, without steel protector plates.) 

As such it would be a very good idea to **turn off the breaker** for the affected circuit, open up the wall, have a look, and call an electrician if you are not comfortable fixing electrical things yourself.
Yes. Be *very* worried.

Keep everyone away from the closet/hole...

When you can, turn off the house's main isolating switch, and make sure nobody can turn it on while you work.

Tape over the hole with electrical tape. Leave the mains switched off if you can.

*CALL AN ELECTRICIAN* to repair the damage you've done to the wiring.