If a baby had eczema, does it cause the baby skin discoloration?

Depends... ...On what you mean by "discoloration." if you mean redness, that's a common component of eczema (and many other rashes). If you mean the lightening or darkening that persists after the rash has healed, that's called postinflammatory change, and is quite common. It goes away eventually, but often very slowly.