The first time I tried this was on Normal difficulty. I died the first time. The second time I only used a couple stimpacks.
The most important thing is to be inside when the queen is attacking. You can easily dodge her ranged poison attack from there. You can also fight any babies that come your way without worrying about the queen. It also helps to lay down mines on the break in the wall where she comes in. Just like with any other boss chems can be useful, especially Psycho.
Inside the walls, there is a missile launcher, along with some missiles. I can't recall exactly how many, but I think it was at least seven scattered about. Pick those up. There's also a flamer and a decent amount of flamer fuel, but I didn't want to get that close to her. The flamer might work well on the babies.
From inside, I stood in the doors and shot missiles at her. You don't need to use VATS for this, even if you normally use it for all your shots. Just aim at the lower part of her body, under the shell, and fire. Whenever she looked my way, I ran to another door and avoided the ranged attack. It leaves some harmful mist behind, so don't run right back into it. This attack does poison damage, which ignores your ballistic and energy resistances. You can get poison resistance from the "Poisoner's" legendary armor effect, and also from Astoundingly Awesome Tales #5: The Mad Russian's Revenge, which can be found in Pickman Gallery.
That character wasn't that good at combat, but after firing all the missiles I was able to finish the queen off with some combat rifle shots.
I've since defeated the queen on Hard, Very Hard, and Survival. This basic strategy continues to work, although you're going to need more missiles. In future playthroughs, I've saved all the missiles I've run into, rather than selling them. This gives me dozens by the time I get to the castle.
If you can do good ranged damage, especially if you can do a lot of crits, you might be able to kill her easily enough with your regular gun. The queen's head is weak, just like other mirelurks. If you can't hit the head, the rest of her body is still weaker than the shell. If you have Macready's perk, Killshot, then hitting her head is extremely easy, and the whole fight shouldn't be too much trouble.