What did David want to be throughout the movie (what he wished for) and why did he wish that?
He wanted to be a real boy, because he believed that would make his 'mother' (Monica Swinton) love him.
BLUE FAIRY You have been searching for me, haven’t you David?
DAVID: For...my whole life.
BLUE FAIRY: And what after all this time have you come to ask me?
DAVID: I had a wish to make.
BLUE FAIRY: And what is your wish?
DAVID: Please make me a real boy so my Mommy will love me, and let me stay with her.
BLUE FAIRY: David, I will do anything that is possible, but I cannot make you a real boy.
He wanted to be a real boy, because Spielberg's AI builds - superbly, it must be said - on the book Pinocchio, and on Disney's movie, as well as some other sci-fi classics do, like Avengers: Age of Ultron (you can even hear Pinocchio's voice in the background as Ultron daydreams).
In AI, the Blue Fairy is the Blue Fairy from Pinocchio, an image of what the puppet (robot) took for his mother, but Spielberg just made a subtle reference there for those aware of the old puppet's story.
Many sci-fi themes are repeated through the ages, but that is not a bad thing, since the good ones do a very good job in retelling the old story in a very intersting modern tale.