So, to sum up:
1.) The Persian and Byzantine state were exhausted by over a quarter century of warfare.
In Byzantine Europe much of the Balkans and mainland Greece were essentially sacrificed to the Slavs and Bulgars, as resources were poured into the bleeding east. Italy was being dismantled piecemeal by the Lombards, with no resources to spare for it, either. Egypt and Syria were temporarily overrun by the Persians. And by temporarily, I mean years - over a decade under foreign occupation. The last Persian troops weren’t successfully negotiated out until 630. The Arab penetration began in 633 or 634.
On the flip side Persian Mesopotamia was eventually overrun by the Byzantines, its irrigation systems temporarily ruined. As Captain Amazing noted political chaos descended after the loser in the long war, Khusrau II Parviz was assassinated. The empire descended into near-anarchy. It was the Persian general Sharbaraz that the emperor Heraclius negotiated with in 629 to shift the last garrisons from Egypt and Jerusalem, not any of the ephemeral Shahs busy killing each other over control of their bankrupt and dissolving state.
2.) Religious foment was added to the internal weakening of both the Sassanid and Byzatine empires, as Zoroastrian and ‘Catholic’ ( not to be confused with modern Catholicism ) orthodoxy conflicted with large segments of both states.
3.) The Arabs were highly motivated and at least vis-a-vis outsiders, had a unity of purpose. For example one of Heralius’ greatest strengths had been not any overwhelming military ability, but rather his political acumen at dividing enemies internally. This proved useless against the Muslims who could not be divided against each other. Heraclius’ negotiating skills would be brought in to play only after disaster, when he was forced to sacrifice lands on the eastern border to buy time to shore up his defences in Anatolia.
4.) The Arab client states of the Ghassanids ( Byzantine ) and Lakhmids ( Persian ) had not only collapsed or been dismantled, they generated old enmities that drew Arab forces to advance northwards.
Concordant with that, the Bedouin Arabs that had provided a defensive shield for the desert borders of Syria and its outlying towns and cities were defunded. Not only causing significant resentment at their loss of subsidies, but stripping out Byzantine defences in the area. Civilian populations in this day and era were largely unarmed.
5.) Finaly all the above would have been for naught if the Arabs had not been victorious in battle. The horribly battered Byzantine and Sassanid states were still able to field effective armies and could have won the day. But once these had been lost, they could not recoup their losses to cope.
For example the Byzantine state ( according to Walter Kaegi, at any rate ) had some 98,000 - 130,000 troops on the books at the time of the Arab advance. But only 10,000 - 20,000 were high quality mobile expeditionary forces, the rest were very mixed quality garrison troops and these were spread out defending the empire. At best 50,000 troops were available for the Syrian theater and not much more than half of those ( and the better quality ones ) could be divorced from garrison duty to take the field. Once this force had been essentially destroyed at Yarmuk ( and earlier, smaller Arab victories had already unhinged the region ) , Syrian defences collapsed like a punctured balloon.
Similarly with the Persians - al Qadisyyiah cost them Mesopotamia. Nihavend would cost them the core of Persia and the war.
In all of the above battles the Arab forces were outnumbered and except perhaps in terms of somewhat superior mobility ( and whatever morale advantages at least some zealotry confers ) had no great edge over the experienced soldiers they were facing. But they won and by winning they broke the backs of the exhausted states they faced.
Once Syria, the manufactuary of the Byzantines - and Mesopotamia, the economic engine and site of the capital of Persia - were lost, the situation became that more dire. The Arabs now commanded interior lines and ( however ruined ) vastly greater economic resources that were denied the old empires. Large, disgruntled Arab populations in Syria, the former protectors of the region, joined the victorious new movement, swelling Muslim ranks. From there on it just became a snow-balling affair.