As a rule of thumb, in everyday language, you can replace "nous" by "on" whenever it is the subject of a conjugated verb, and not at any other time. In other words, it's not the word "nous" that's being replaced by "on" in the informal setting, because the word "nous" is very much alive; what's being replaced are the "nous conjugations."
Also, as a rule of thumb, such a replacement is extremely likely in the spoken language, except in formal settings.
There is one important class of exceptions, which is when you are dislocating a subject with a tonic pronoun.
C'est nous qui sommes là.
Since "on" is not a tonic pronoun, you can't say "**c'est on qui..." I think in the informal language, some would say "sont" or maybe "est" here, but this is not (prescriptively) correct.