Assuming that the rocks in a given area have not been tilted or otherwise moved around by geological action, you can see changes in the environment vertically in the sedimentary rocks. This is because of the fact that older layers of rock will be covered over with newer layers. When an excavation or a river or something cuts through a deposit, the layers can be seen in vertical order, oldest at the bottom, newest at the top.
The changes in depositional environment can be seen in the types of rock in each layer. The rocks will reveal aspects of the environment in which they were laid down. They will show what kinds of sediment were laid down, they will show some things about the types of plant life that were around at the time. They can also show what laid the various strata down.
So the changes in environment can be seen because sediment will be put down in layers that will differ as the environment changes.