No rules, just, as Toritoribe-san says, a recommendation. Start with the polite, and progress to casual if the atmosphere allows it, and if you are comfortable with it. Because depending on the situation, casual can come across as rude. This is true for real life in Japan. Polite should be the default, and then one can progress to casual as the situation allows. This tends to be the opposite of how we think in the US, where casual is the default and formal is seen as somehow something only exercised on rare occasions.
Of course, in the raw and unrefined world of Twitter and YouTube, you find all sorts of crude and impolite comments. Anonymity allows everyone to be as rude as they wish to be, so no need to be overly sensitive about how you post there. But as a general rule, "polite" is the default setting in Japan.