First of all for the parents responding please state if you have teens or older. Believe me, we can all think we know what we will do with a teen, but until you are raising a teen or have actually raised one.. You will not understand this.
You could take the electronics, or you could see how she functions the next day with extra chores, running errands etc. Why is is upsetting for her to stay awake all night? Is she doing this every night? Did you all have big plans today?
How did she behave?
You are not a failure as a parent as another person suggested. You are just dealing with the teen years. With reality.
We made a deal with our daughter in about 4th or 5th grade. She could stay up as late as she wanted, but she had to be able to function the next day. This meant smile, do what we asked, stay awake and make good grades in school.. etc..
If she did not, I would set a bedtime for her. We had very few problems with this. She very quickly learned how much sleep she needed to function.
Heck send kids to a sleepover and sometimes they stay up all night. Same at summer camp.. It is just a part of being a teen and learning what you can handle and what you cannot. If they never try this, in College they go wild and miss classes, trying to stay up and attend classes.
Better they try this at home. .