Expansion tank generally are use on hot water boiler systems.
House hold boiler system is set default by the boiler feed (default 12-15 psi pressure regulator) and it allow water to flow into the system (water makeup) if pressure drop below the default setting.
Expansion tank is there to keep the pressure regulated below default setting at 30 PSI when the water reach 140~160 F (max 180 F, water expand about 4% from street temp to 180 F). If expansion tank is water logged then the pressure would exceed the design pressure of system, thus trigger the pressure relief valve (default 30 psi) to evacuate water pressure.
No you don't need an "expansion tank" for your in ground sprinkler, however you may need a "pressure tank" if you are using a pump to pressurize your watering system.
Depends on the jurisdiction & your sprinkler system needs/design; you may need a PVB (pressure vacuum breaker), or DCVA (double check valve assembly), or RPBA (reduced pressure backflow assembly).