All I know about it is my own birdy baby, and he squawks when we go outside and sometimes when we leave his sight (going into another room). He really lets loose when I leave for work in the morning. But he also squawks when I come home, to make sure I come and greet him (preferably before greeting the husband or the dogs!). It is asking for attention as much as anything. And you don't necessarily have to get her out of her cage; you can try just whistling and talking and letting her know you're nearby. I try to think of it from the bird's point of view. Here you are, trapped in this cage, and you can't see your people and you don't know they haven't wandered off and left you forever, and you want to be reassured, so you start creating a ruckus in the hopes that somebody will give you that reassurance.
Clyde also squawks like a maniac when he's upset. Yesterday my in-laws came by and he hadn't met them before so he threw a real fit about that, and again while I was getting ready for work this morning, when he wanted to play Simon Says but I didn't answer as quickly as he wanted me to. He couldn't see me and my whistles back to him in Simon Says let him know I was close by, so when I stopped (to brush my teeth -- YOU try whistling while brushing your teeth

) he got upset. As soon as I called out to him, he was fine. Squawking, for him, is partly frustration, partly communication (in the morning, to make sure everyone does a Mouseketeer sound-off first thing), partly hissy fit ...
Something must be bugging Lily that you haven't figured out yet, so keep trying things until you do figure it out and fix it so it doesn't upset her anymore.