The Shidduch is from Hashem
The Gemara (Moed Kattan 18:) brings proofs "from Torah, Nevi'im, and Kesuvim" that shidduchim are destined from heaven.
The Torah (24:50, this week's parashah) states, ויען או רע אליך דבר נוכל לא הדבר יצא 'מה ויאמרו ובתואל לבן טוב, "Lavan and Besuel said, 'The matter is from Hashem. We can't tell you good or bad.'" Lavan and Besuel were big resha'im, but even they recognized that the shidduch was destined from heaven.
The Gemara also proves from Navi that shidduchim are made in heaven and arranged by Hashem. It states (Shoftim 14:4) regarding Shimshon, היא 'מה כי ידעו לא ואמו ואביו, "His father and mother didn't know that it was from Hashem." Also, in Kesuvim it states (Mishlei 19:14), בית משכלת אשה 'ומה אבות נחלת והון, "A house and wealth are the parents' inheritance, but an intelligent woman is from Hashem.'" With these proofs from Chumash, Navi, and Kesuvim the Gemara attests that shidduchim are from Hashem.
The question is, isn't everything from Hashem? So why does the Gemara specifically mention shidduchim?
The Chazon Ish's zt'l answered that the Gemara teaches us that the hashgachah pratis seen by shidduchim surpasses the general hashgachah pratis. Generally, Hakadosh Baruch Hu leads the world under a cloak of teva, nature, but when it comes to shidduchim, Hashem's hand is clearly evident. If you want to find Hashem in this world, analyze what happens by shidduchim, and you will be amazed at the revealed hashgachah pratis you will discover.
Ladders and Shidduchim
The Midrash states: A queen asked Reb Yosi ben Chalafta, "How long did it take Hashem to create the world?" "Six days." "And from then until now, what does Hashem do?" "He makes shidduchim."
This Midrash is well known, but it has another version (girsa). It says that Reb Yosi ben Chalafta told the queen that from the time of Creation until today, "Hashem is making ladders. He raises some and lowers others. As it states (Tehillim 75:8), זה שופט אלקים כי ירים וזה ישפיל, "Hashem is the judge, He lowers this one and raises another one.'"
We can explain that both statements are the same. Hashem makes shidduchim, but to enable the shidduchim to occur, Hashem sometimes needs to raise the poor and make them wealthy or lower the rich and make them poor. Because only that way will the destined shidduchim occur.
Why the Wicked Merit Good Shidduchim
Sefer Chassidim (216) teaches that we sometimes see reshaim doing shidduchim with tzaddikim. They merited making these good shidduchim because they had righteous ancestors or because people embarrassed them. Hashem makes these resha'im wealthy because otherwise, the tzaddikim wouldn't agree to be meshadech with them.
The Role of Parents and Hashem
The father of the chasan and the father of the kallah is called "the מחותן" mechutan, and the mother is called "the mechutenste". The Belzer Rav zt'l asked that it would make more sense if the father were called "the מחתן" michaten (verb) because, to a large extent, he made the shidduch, he paid for the wedding and so on. Why should he be called מחותן, which implies that the marriage happened to him? But the explanation is that the parents don't make the chasunah, even if they were involved in choosing the shidduch and paying for the chasunah. They remain מחותן; it happened to them. The מחתן, the One who makes the chasunah, is Hashem himself.
Similarly, Chazal refer to the chasan as ארוס. The Tosfos Yom Tov (Nedarim 10:3) asks that, according to dikduk, he should be called מארס because he is the one who marries the woman. ארוס sounds like it happened to him, and not that he did it. But the answer is the same. Everything is arranged from heaven. He marries the woman, but in a way, everything happened to him.
The truth is that this is stated in the Gemara (Sotah 2.): "Forty days before the child is formed in the womb, a bas kol announces לפלוני פלוני בת, "The daughter of ploni will marry ploni." The shidduch was arranged and planned even before the child was born, so it was destined that they should get married.
The Tenaim contract contains the words ושארית שם יתן הוא אחרית מראשית המגיד. It is said in the name of the Rema m'Pano that the words ראשית and שארית have the same letters. This is to hint to the chasan and kallah that just like at the beginning of their married life, at the ראשית, they knew that the shidduch was from heaven and that Hashem arranged it, they should also remember this ten years after the marriage, and twenty years after the marriage, and so on. They should remember at the שארית end that the shidduch was from heaven from the ראשית. Keep this emunah in hashgachah pratis alive throughout the marriage.