Here is the little hat that I made for my vintage Amidala, with two combs sewn into it to hold it in place.
I've heard that the best way to keep a hat or headpiece on is to french braid your hair and attach it to that. Well I can't make a tight french braid on myself, I've tried. Another trick for shorter hair is to make a mini-bun, but simply twisting a few strands of hair together and tying them with a hair elastic. I tried the mini-bun, but my hair was too long and it didn't end up as a tight mini-bun.
My solution was to make a regular braid that started on one side of the head. I braided it upwards and laid it across the head until I reached the other side. I then put an elastic around it fastened it with two criss-crossed hairpins, and had the end of the braid brushed into the rest of my loose hair.
Then I put the hat on, making sure that the combs gripped into the braid, and now it sits really tight and secure and I don't have to worry about it sliding around or falling off.