I saw a sentence that read: A lui piace il tè. I could not find an explanation for the use of a before lui.
There are two sources for confusion:
- the subject is at the end
- piacere has a very peculiar construction in Italian
In the sentence the subject is il tè; it's similar to Roberto piace ad Alice (which in English would be Alice likes Bob). So Italian places the person that actually likes somebody/something as the grammatical indirect object.
When this grammatical indirect object is a pronoun, usually the word order becomes
⟨indirect object pronoun⟩ piace ⟨subject⟩
and the pronoun is normally in weak form mi, ti, gli, ci, vi, gli.1 So it should really be
Gli piace il tè
The long form would be used if there's some opposition to be underlined:
A lui piace il tè, a lei il caffè
(in the second part, the verb piace is implied).
1 I know that grammars prescribe a postponed loro instead of gli for the third person plural. But it's much more common in spoken and also in written language to use gli both for the plural and the singular.
The literal meaning of the sentence is
Tea is pleasant to him
which is how He likes tea is usually expressed in Italian. Here the preposition a is the exact translation of the preposition to in English: it introduces what's called the complemento di termine or in English indirect object. See for example Parlo a lui, "I speak to him" or Ho dato quel libro a mia sorella, "I've given that book to my sister".
For more detailed on how to translate the verb to like in Italian see the excellent answer linked by DaG in the comments.