If atoms have well defined energy levels and those differences
correspond to the frequencies of light that can be absorbed, how is it
that opaque objects absorb all or most visible light frequencies get
Photons in almost all frequencies hitting an object are absorbed in different ways (absorbed, reflected, refracted, scattered, transtormed into thermal energy) by the atoms, not only by the electrons.
Opaque objects absorb almost all frequencies of the visible spectrum because most frequencies (even those that do not correspond to a specific energy level) are absorbed and transformed into thermal radiation
Some frequencies are scattered, reflected and one ore more frequencies are re-emitted, and that is why opaque object are visible and have colour(s)
... frequencies get absorbed and you basically don't have any visible
light coming out on the other end.
In tranparent materials the energy gap between the ground and excited level of a free electron is too high compared to the energy of the photon, which therefore cannot excite the electrons and consequently lose energy. That is why UVA rays pass through a glass and more energetic UVB are blocked.
Light can pass through a body only when photons are absorbed by the inter atomic bonds and re-emitted, this is why why the speed of light is slower in tranparent materials. They are transparent because the direction of the light is preserved by the ordered bonds and because very little energy is lost. In opaque objects photons are emitted or scattered in all directions