Bankroll management is a fundamental skill that requires patience and practice. Without bankroll management you are doomed, and will go broke soon after you deposit. Even top poker player's can go broke through poor bankroll management and it is not uncommon for this to happen to professionals.
A good rule to follow is that in any one game of no-limit texas holdem you never have over 5% of your bankroll at the table. This can move to 10% when playing limit texas holdem, as there is less variance. Variance is the measure of what "swings" can happen when playing poker. Basically having only 5% of your bankroll at a table will help balance the "bad run's" that happens to all poker players.
If sit and go tournaments are what you play online, it is best to not have more then 5% of your bankroll as a buy-in for any one limit. This is once again to protect yourself from the swing's online players can face.
If you are a multi-table tournament, you can expect your variance to be very high, as winning money will be occur rarer then if you played a sit and go, although the amount you win will probably be a lot more, specially if you get to the final table. I suggest having no more then 2%-3% of your bankroll used as a buy-in to any online poker tournament.
If you are playing outside of your bankroll it is best to move down limit's and play at a lower level. If you regularly play outside of your limits you will eventually go broke, regardless how good of a player you are.