It means that someone or something behaved very, very well. It doesn't mean that someone literally was beautiful. It's a very informal phrase though. I'd use it to talk about my young daughter: "She behaved beautifully at church today. She didn't cry, fuss, or throw a tantrum." Or you could use it to talk about an animal: "My dog behaved beautifully at the dog show today."
I wouldn't use it to talk about another adult or in an academic setting.