Both server and client have a copy of the world and thus a copy of the tile entity. You can find information about syncing data to the client version in the docs here: https://mcforge.readthedocs.io/en/latest/tileentities/tileentity/#synchronizing-on-block-update. If you only need the data within a GUI you can use the Container to sync the data instead to avoid unnecessary network traffic.
The other way around (client to server) is more complicated - the client generally cannot be trusted (otherwise you enable cheating). Most of the time you need a custom packet that tells the server that