The world number one, playing at Indian Wells for the first time in 14 years, needed just 54 minutes to beat her opponent from Kazakhstan.
Williams was required to defend just one break point throughout the encounter, while breaking Diyas on six occasions.
Diyas was on many occasions her own worst enemy, double faulting on seven occasions and producing a plethora of unforced errors.
Williams will now face the winner of the third-round clash between Sloane Stephens and Svetlana Kuznetsova.
Other early winners on Sunday were Heather Watson and Elina Svitolina who both registered upsets, beating seventh seed Agnieszka Radwanska and tenth seed Lucie Safarova respectively.