Adult pupils in the early stages of learning to play piano often say to me that when they're practising a piece that they're working on, at some point they start to find that they're playing it from memory and needing to read the music less. Often they express concern that they're doing something wrong and they ask me if they should still be reading the music closely. I assure them that no, they're not doing anything wrong and that memorisation is necessary in order learn to play a piece of music fluently. The only time you are expected to aim to play a piece of music fluently without committing it to memory is when you are sight reading. However, your sight reading level is usually a few levels below your polished piece level, and your level of technique often allows you to learn to play something much harder than what you can sight read. This is why in graded exams the pieces that you work on and present to the examiner as a performance are so much harder than the pieces that you are presented with during the sight reading test.
The reason why we practice a piece of music is to commit it to memory in order to play it fluently. The repetition during practice develops muscle memory so that our fingers automatically go to the correct notes without us having to think about it. We also develop our technique in the process - the development of good technique is dependent upon muscle memory. Other aspects of memory developed during practice of the piece are aural memory, visual memory, structural memory, memory of performance directions etc. Unless a piece is easy enough for you to sight read fluently, all these aspects of it (sound of the melody, rhythm, overall structure, dynamics etc.) are too much to think about all at once and perform fluently without first committing to memory. After you have spent some time working on a piece and getting it fluent you may still prefer to perform it with the music in front of you. However this doesn't mean you are sight reading it, far from it. All that practice you have done to get it from a halting, tentative reading to a fluent sound has committed most of it to memory. You're often just glancing at the music during moments when you're less confident, or just vaguely looking at the right area of the music as you go along just in case your memory fails. When you have worked hard to get a piece of music up to performance standard, having the sheet music in front of you is often just for extra security, or for the few tiny aspects you might not have quite managed to commit to memory.
On a side note, if you have a lot of trouble playing your piece without the music - a possible reason for this is that you haven't quite got it up to performance standard yet; another possible reason is that there may be some aspects you haven't quite committed to memory despite being able to play it reasonably fluently (muscle memory aids fluent playing but other aspects of the memory may be incomplete which makes it harder to play without the music); or maybe you have become dependent on having the music in front of you for security. See my article A Basic Method for Getting Started with Memorisation for a method that may help you to overcome some of these obstacles. Also see my article Memorising Music for some information on different aspects of memorisation. It can be useful to learn to play your piece without the music even if you plan to ultimately perform it with the sheet music in front of you for extra security.
Learning to sight read is a slightly different skill, and for those adult pupils who express concern that they might forget how to read music if they keep memorising, I suggest that they practise sight reading alongside their memorisation so that their reading skills don't get neglected. To practice sight reading you need to find pieces that are a lot simpler than the pieces you're working on, and play through them no more than a few times. I usually suggest three times. Any more than this and you're starting to memorise it, then it's no longer sight reading.
In conclusion, memorisation is an important part of learning to play piano. It allows you to advance your technique and play music fluently that is beyond a simple level. What's more it allows you to step back from the intellectual aspect of deciphering the code on the sheet music and really start to interpret it as as an expressive work of art.
The reason why we practice a piece of music is to commit it to memory in order to play it fluently. The repetition during practice develops muscle memory so that our fingers automatically go to the correct notes without us having to think about it. We also develop our technique in the process - the development of good technique is dependent upon muscle memory. Other aspects of memory developed during practice of the piece are aural memory, visual memory, structural memory, memory of performance directions etc. Unless a piece is easy enough for you to sight read fluently, all these aspects of it (sound of the melody, rhythm, overall structure, dynamics etc.) are too much to think about all at once and perform fluently without first committing to memory. After you have spent some time working on a piece and getting it fluent you may still prefer to perform it with the music in front of you. However this doesn't mean you are sight reading it, far from it. All that practice you have done to get it from a halting, tentative reading to a fluent sound has committed most of it to memory. You're often just glancing at the music during moments when you're less confident, or just vaguely looking at the right area of the music as you go along just in case your memory fails. When you have worked hard to get a piece of music up to performance standard, having the sheet music in front of you is often just for extra security, or for the few tiny aspects you might not have quite managed to commit to memory.
On a side note, if you have a lot of trouble playing your piece without the music - a possible reason for this is that you haven't quite got it up to performance standard yet; another possible reason is that there may be some aspects you haven't quite committed to memory despite being able to play it reasonably fluently (muscle memory aids fluent playing but other aspects of the memory may be incomplete which makes it harder to play without the music); or maybe you have become dependent on having the music in front of you for security. See my article A Basic Method for Getting Started with Memorisation for a method that may help you to overcome some of these obstacles. Also see my article Memorising Music for some information on different aspects of memorisation. It can be useful to learn to play your piece without the music even if you plan to ultimately perform it with the sheet music in front of you for extra security.
Learning to sight read is a slightly different skill, and for those adult pupils who express concern that they might forget how to read music if they keep memorising, I suggest that they practise sight reading alongside their memorisation so that their reading skills don't get neglected. To practice sight reading you need to find pieces that are a lot simpler than the pieces you're working on, and play through them no more than a few times. I usually suggest three times. Any more than this and you're starting to memorise it, then it's no longer sight reading.
In conclusion, memorisation is an important part of learning to play piano. It allows you to advance your technique and play music fluently that is beyond a simple level. What's more it allows you to step back from the intellectual aspect of deciphering the code on the sheet music and really start to interpret it as as an expressive work of art.