These teens got their childhood dream when their friend dressed up as Barney for prom. Who knows what led to that decision. It's possible this person just wanted to be funny (mission accomplished), but maybe their original outfit got ruined so they had no choice but to go with the Barney outfit. It's not like you can show up to prom in a t-shirt and shorts.
Many people have fond memories of their time with Barney, especially millennials. Barney was peak children's entertainment for young millenials. "I love you. You love me. We're a happy family." With lyrics like that, how could you not love him? Generally we grow out of our Barney phase by the time we're adults. That doesn't seem to be the case with this group of people, but who cares? They have the rest of their lives to grow up