This is the stereotypical phrase for a woman to say to a man who she's breaking up with because she's not attracted to him.
The idea behind the phrase is that it sounds nicer than simply saying that you don't want to date the person any more. In reality, though, men hate to hear this. When a woman says that she "hopes we can still be friends", it makes the guy think that she doesn't find him attractive.
Some people actually say this phrase when they're breaking up with someone. But you can also hear this phrase being used a lot in jokes in TV shows and movies.