Both are fine in British English.
(I note the two previous answers that say 'thought of' are from American/Filipino English speakers, so perhaps there are some regional differences?)
Some people argue that 'to think about' something is a conscious, planned period of thinking. For example "She spent ten minutes thinking about the exam question before writing her answer."
And that 'to think of' is more spontaneous. For example "The smell of Thai food made him think of when he visited Thailand."
But I don't think that most native speakers are aware of (think of/think about) this distinction when choosing which one to use.