Following are the two main reasons to use transformer in electronics and electrical circuits.
1. To transform high voltage AC to low voltage AC, or vice versa.
2. To isolate one part of a circuit from another, so the second part is no longer referenced to the first part. This is usually done for safety reasons.
Transformers serve many purposes so here are a couple. They can be used to provide isolation from one circuit to another and they also can be used to provide a step up or step down of ac voltage. Quite handy in the building of power supplies.