The religion of Islam is a religion that combines between the exterior and the interior, the material and spiritual aspects. God is the creator of the wind and cloud, and rainfall depends on the rules which He has embedded in the nature, yet God says that the cause of rainfall is people's faith and piety.[1]
God, the Sublime, has laid out the entire affairs of this world on the basis of order and wisdom; He has fixed a cause for every phenomenon and every event. It is not possible to attain an objective except through its special cause or causes.
First of all, one must move ahead and should pray to God to help him tread in the right path so that he may achieve his desired goal. This is the meaning of dua and seeking divine assistance. A dua is fulfilled only when we endeavor to achieve our goal using its specific means and causes, and pray to God to help us achieve the goal.
One who prays for something, he also puts all his will and efforts into it; but when the occurrence of something is not linked with our will only and there are a lot of other factors involved in order for it to be actualized, then we pray to God, the Cause of all causes, to make other means or causes available for us. If you go through Shiite revayāt (traditions), you will find out that they have been very well combined together. On the one hand we have been instructed to pray for the fulfillment of our wishes, on the other hand we must strive towards achieving it.
Imam Sadiq (a.s) says: "God does not do a task without its means."[2] In some other traditions, those individuals have been introduced whose duas (supplications) are not fulfilled. They are people who do not give importance to hard work and endeavor and wish God to grant them everything. He who does not toil to earn something and expects God to give him sustenance, his dua will not be fulfilled.[3]
Therefore, dua has a very important role in the solution of our problems but it does not at all mean that hard work and endeavor do not pay.
Related links:
1. Question 15808 (site: 15646) The Circumstances under which a Dua is Fulfilled.
2. Question 2145 (site: 2269) Conditions and Ways of Fulfillment of Dua
3. Question 397 (site: 413) The Relationship between Dua and Individual Effort for Marriage
[1] - "And if the people of the towns had believed and guarded (against evil) We would certainly have opened up for them blessings from the heaven and the earth, but they rejected, so We overtook them for what they had earned. " [Al-A'araf: 96]
[2] - Al-Kaafi, pg. 183, excerpted from question 2900 (site: 3109). Of course, it should be noted that generally God does not grant a wish unless it is accompanied with its means. That is because God wants mankind not to depend on material causes very much and not to ignore God's roles in their affairs. God does certain actions without the involvement of their natural causes such as the creation of Prophet Jesus without father.
[3] - Al-Kafi, vol.5, pg. 77.