There is no such rule. There is nothing wrong with starting a sentence with "to". It is common and useful.
"To whom do I have the pleasure of speaking?"
"To be or not to be, that is the question."
"To err is human, to forgive divine."
Perhaps what you actually read is that you should not END a sentence with "to". That is good advice, but not a strict rule. More generally, you should try not to end a sentence with any preposition.