"I thought about it."
Translation:J'y ai pensé.
look it up on this link, it is tricky but it really tells when to use the pronoun "y"
With the auxiliary avoir, only a preceding direct object triggers an agreement in the past participle.
The verb is "penser à qqch/qqn", with an indirect object.
"y", stands for "à + something mentioned before" so it cannot be a direct object prompting an agreement in the past participle.