Why is seeking knowledge important in Islam and how does seeking knowledge not only religiously brings us closer to Allah swt?
The Quran says:
25. If they disbelieve you, those before them also disbelieved. Their messengers came to them with the clear proofs, with the Psalms, and with the Enlightening Scripture. 26. Then I seized those who disbelieved—so how was My rejection? 27. Have you not seen that God sends down water from the sky? With it We produce fruits of various colors. And in the mountains are streaks of white and red—varying in their hue—and pitch-black. 28. Likewise, human beings, animals, and livestock come in various colors. From among His servants, it is the learned who (truly) fear God. God is Almighty, Oft-Forgiving. 29. Those who recite the Book of God, and perform the prayer, and spend of what We have provided for them, secretly and publicly, expect a trade that will not fail.1
Exalted is God, the True King. Do not be hasty with the Quran before its inspiration to you is concluded, and say, “My Lord, increase me in knowledge.”2
In fact, it is clear signs in the hearts of those given knowledge. No one renounce Our signs except the unjust.3
And in another place it says, regarding the uneducated Bedouins:
The Desert-Arabs are the most steeped in disbelief and hypocrisy, and the most likely to ignore the limits that God revealed to His Messenger. God is Knowing and Wise.4
The Desert-Arabs say, “We have believed.” Say, “You have not believed; but say, ‘We have submitted,’ for faith has not yet entered into your hearts. But if you obey God and His Messenger, He will not diminish any of your deeds. God is Forgiving and Merciful.”5
The picture that the Quran draws is that those who lack knowledge are more likely to fall into error and sinful behaviors, and that increased knowledge helps a person become better and more pious.
As for non-religious knowledge, it helps us appreciate the Creator’s greatness to know more about His creations.
190. In the creation of the heavens and the earth, and in the alternation of night and day, are signs for people of understanding. 191. Those who remember God while standing, and sitting, and on their sides; and they reflect upon the creation of the heavens and the earth: “Our Lord, You did not create this in vain, glory to You, so protect us from the punishment of the Fire.”6
Do they not consider that God, Who created the heavens and the earth, is Able to create the likes of them? He has assigned for them a term, in which there is no doubt. But the wrongdoers persist in denying the truth.7
In verse 21:30, the Quran refers to two facts of the physical world, one from physics, the other from biology:
Do the disbelievers not see that the heavens and the earth were one mass, and We tore them apart? And that We made from water every living thing? Will they then not believe?
For a person who believes in God, the above verse seems to refer to the Big Bang hypothesis, which is the accepted theory for how the universe started. The Quran even refers to the expansion of the universe that was discovered in the last century:
We constructed the universe with power, and We are expanding it.8
While these facts of physics, biology, etc. are not sufficient to constitute proof, they are sufficient to constitute āyāt (“signs”, “pointers”). They are not proofs of God’s existence and greatness, by the point to Him and His power, they suggest it, and for the person who humbles his or her heart to God, they act as strengtheners for their faith and their appreciation of God’s presence and greatness.
The Egyptian scholar Muhammad al-Ghazali (1917-1996) says:
The Quran, in pointing to God's existence, is a universe that speaks, the same way that this universe is a silent Quran.
For those of us who have submitted to God and love Him, the more we learn about the universe the closer we feel to Him, because we know it is all His creation, and that He is in charge of it.
Secular knowledge helps us know God better and also helps improve our lives in various ways (you can read a scientific book about food and in this way make better diet choices). It is quite obvious that more knowledge is better than less knowledge.
And as for religious knowledge, it helps us avoid errors and know the best ways of pleasing God, which is the purpose of our lives.
For a discussion of Islam and science see my essay: God, Evolution and Abiogenesis: The Topological Theory for the Origin of Life and Species