They are distinguishable in cosmological models by variation of the exponent in their equation of state relating the pressure of the mass/energy to the energy density. Specifically, dark energy is modeled as a cosmological constant so the pressure is equal to the negative of the energy density. Then individual contributions due to neutrinos, dust, stars etc. end up with exponents differing from 1.
Long story short: the stress energy tensor is a different structure for different types of matter/energy.
Long story short: the stress energy tensor is a different structure for different types of matter/energy.