Observations of the Sun in the visible spectral range belong to standard measurements obtained by instruments both on the ground and in the space. Nowadays, both nearly continuous full-disc observations with medium resolution and dedicated campaigns of high spatial, spectral and/or temporal resolution constitute a holy grail for studies that can capture (both) the long- and short-term changes in the dynamics and energetics of the solar atmosphere. Observations of photospheric spectral lines allow us to estimate not only the intensity at small regions, but also various derived data products, such as the Doppler velocity and/or the components of the magnetic field vector. We show that these measurements contain not only direct information about the dynamics of solar plasmas at the surface of the Sun but also imprints of regions below and above it. Here, we discuss two examples: First, the local time-distance helioseismology as a tool for plasma dynamic diagnostics in the near subsurface and second, the determination of the solar atmosphere structure during flares. The methodology in both cases involves the technique of inverse modelling.