Why does my bathroom light go off and on after switch gets turned on
Based on saying you can push up on the switch and the light turns back on, the switch sounds like it's faulty and needs to be replaced.

This is a pretty easy DIY job. You need a new switch ($1-2 at any hardware store) and some basic tools, post back if you need help with the specifics. 

If you've never done any electrical work before, please read up first and use ample caution. Electricity can be extremely dangerous, and it's why even people like me that have been doing it for years still carry around and use a non-contact voltage detector ($10-15) every time we go to touch any wiring, just to be really, really sure it's not live.