“To” and “too” are homophones, which means they are pronounced the same but have different meanings—and that means they’re easily confused.
Marko Ticak, writing at Grammarly, explains the differences between “to” and “too” and notes some occasions when each should be used.
Indicating direction of movement. “To” is used to show place of arrival or direction of movement. Example: “I am traveling to France.”
Indicating an infinitive in a series of verbs. When an infinitive verb follows another verb, you use “to.” Example: “He never expected to win the election.”
Indicating a relationship between words. When indicating possession, attachments, additions and other types of relationships between words, you use “to.” Example: “He announced his engagement to his longtime girlfriend.”
For a range or period of time. “To” applies in these cases. Example: “That species reaches old age in only three to 12 months.”
To replace “also.” If you want to use a word that replaces “besides,” “also,” “in addition” or “as well,” you should use “too.” Example: “She agrees too.”
Excessiveness. To convey an excess amount of something you use “too.” Example: “It was too much information for the computer to process.”
To replace “very.” “Too” applies here also. Example: “These references are too obvious.”
— Adapted from “To vs. Too,” Marko Ticak, Grammarly.