You are asking "how we know...". This may not be a fair question. We created this formalism. You could also ask how do we know that we can write Maxwell's equations using vectors. Long ago they were not, they were written as a large set of coupled scalar (scalar type) equations. The formalism of vector notation was still evolving and being accepted and one has to PROVE that a set of quantities actually behaves like a vector under coordinate transformations.
This is a key to understanding the 4-vector approach. There is a scalar E field potential, Phi, and a vector potential A, in classical electrodynamics.
Once Einstein presented Lorentz invariance in physics (I'm not going to write extensively about that history here) we started on the path of putting all equations in a covariant format. It is the nature of light that governs this invariance, and the postulate that the speed of light is the same for all relatively interital observers. Even Newton's laws of mechanics were elevated to a covariant 4-vector form, as was momentum (E, p) where Energy, E, was thought to be a scalar.
We know that electromagnetism needs to be Lorentz invariant and this motivates elevating Phi to the time component of a 4-vector, just like E is the time component of 4-momentum. This is also indicated by seeing how the equations transform under Lorentz. The 4-potential (Phi, A) must be as is to obey this symmetry. Then the rest follows.