* In "not heavy", "to" functions as a preposition, indicating direction or location.
* In "set fire to", "to" functions as a particle, used in combination with the verb "set" to form a phrasal verb.
Both words sound the same but have different meanings and grammatical functions.