Lights are flickering on and off after accidentally bumping into light switch
Removing the cover to look at the switch is safe IF you first turn off power to the circuit at the breaker panel.  If you aren't completely sure which circuit it is, then either turn them all off, or double-check with a multimeter or non-contact voltage detector.  

However, most likely you will not be able to see what's wrong with the switch because the damage will be inside the plastic housing.  Since basic light switches cost less than $1, I'd recommend just replacing it.  It's a simple task that's easy to DIY.  Here's one guide, or you can find a dozen others by googling how to change a light switch.