Well, I think an exact reason could easily be laid out into the story, but.. As far as getting her INTO the tower, I would easily assume that the tower once had a door, especially the tower as designed in the film, but as Rapunzel grew and she wanted to wander, the Witch would have bricked it up, locking her inside with no way out. As far as why she chooses to climb the hair, I would venture that the Witch has a hunger and need to know that Rapunzel is absolutely and unquestioningly devoted to her and having her endure the daily pain of having her hair climbed is what makes the Witch feel that.
I've seen this explained by a poster on IMDB as, the witch cast a spell by which the ONLY way to get into the tower was to say the 'magic words' 'Rapunzel, Rapunzel, let down your hair to me.' It's how the witch makes sure that nobody else gets into the tower but her, or so she thinks. It makes sense to me, so that's the explanation I'd go with.
What I'd like to know is, why hasn't Rapunzel figured out after living in the tower for a lifetime that all she has to do is wind her hair around the hook a few times, and it would take ALL the weight off her scalp when someone climbs her braid? Hmm...
My impression was that the witch can apparate from place to place in a lateral direction but not very high up - that is, she can make herself appear in that tree but she can't go much higher than that and not high enough to make it to the top of the tower.
Obviously she had to climb Rapunzel's hair so that she couldn't use hair actually as yellow as gold for the spell at the end of Act I. Can't miss out on Jack's one moment of genius in the entire show.
It's a plot contrivance that I have no problem with. So much of Into the Woods' set up comes from the original Grim Brothers' Rapunzel that I just accept it. All that vegetable garden and curse stuff comes from the story, too.
If we're getting into technicalities, a more apt question would be how did she get in when Rapunzel was an infant?? Or was it proved that she didn't live there until she was older?
Well if you're going to get picky, a better question would be why didn't Rapunzel tie the far end of her hair to something and use it to climb down herself and then cut herself free?
Art has a double face, of expression and illusion.