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 now have an electrified shelf that alerts you when your kids try to get to their Christmas presents before Santa delivers them. What's so bad? :)

[Craftsman Wall Scanner with AC Wire Warning](http://www.sears.com/craftsman-wall-scanner-with-ac-wirewarning/p-00949067000P?sid=IDx01192011x000001&gclid=CPjgppXq1c4CFYGCaQodqx0DJg&gclsrc=aw.ds)

Something like the above (a stud finder/scanner) will tell you if an electrical line is at the spot you drilled. If there is one then you will have to open the wall to determine if you killed the Romex.

If you look at the light switch box you can tell of they used conduit (required for many cities). If there is conduit run for the light switch, then conduit was run for the wire to the light and you probably did not drill through wiring.
I'm thinking about something else than drilling into a wire.
The power used by your drill could've been high and made the light flicker because it was nearly the maximum this power line could provide.