The phrase bring to someone's attention can be used when scolding someone, but it doesn't always have this connotation. Most importantly, it cannot be substituted for words like scolded, chastised, criticized.
Of the four sentences you've provided, only number 3 uses bring to someone's attention idiomatically. Number 2 is passable, but doesn't include brought to my attention. Numbers 1 and 4 are incorrect.
In sentence 1, you're using brought to my attention to mean scolded. This is not a correct use of the phrase. If the teacher gently scolded you, you might describe this as "the teacher brought to my attention that I was talking". However, semantically and syntactically, you cannot put brought to me attention in that position in the sentence.
The verb bring requires an object. You cannot say, "I bring"; you must say, "I bring [something]". Likewise, in the more complicated phrase bring to my attention an object is still required for bring.
You've done this correctly in sentence 3, where "bring to my attention" has the object "[the fact] that you got to my class three times late". (Incidentally, "you got to my class three times late" is not idiomatic. It should be "you got to my class late three times").
Sentence 4 has the same issue as sentence 1 (it's missing an object for bring), but it's also just not a situation where we'd ever use this phrase. That is to say, no parent would ever say, "Kids, I wish to bring to your attention the fact that you've made a mess of your room." This sounds like a parody of an impossibly posh speaker. As you've correctly noted, bring to your attention is a polite phrase, and this kind of politeness is uncommon when speaking to children.