Audio, sound, and recording engineers (these terms are used interchangeably) have many skills that overlap with music production. And many music producers started out as audio engineers, working in a recording studio or with DAWs (Digital Audio Workstations). At the very least, music producers must know enough about recording technology to be able to communicate effectively with a sound engineer. A good engineer with musical and business skills can become an effective producer.
Although many of the skills overlap, they are not identical. As the name implies, audio engineering is a highly technical field, which requires specialized knowledge of how audio and music technology works to capture the sounds musicians make and then mix recordings that are artistically fulfilling and pleasing to the listener. Producers have a broader skillset and mandate and can also be very adept at the technical aspects of engineering.
There are many kinds of producers. For example, executive producers are responsible for securing budgets and may oversee the marketing and distribution of the recorded works. Compared to an engineer, the producer usually has more input when it comes to the creative side of the music. The producer might even be performing on the recorded track or change notes or sections of the composition.
The producer is primarily tasked with fulfilling the artistic vision of the artist and may or may not possess certain technical skills. The skills for an audio engineer are more defined and narrower but may also lend themselves to a music producing role.