It is said that the vedas are given by the God. But the vedas contain hymns which appear to praise the various devas agni, indra, varuNa and others. Why should the Supreme God say hailing hymns of the other devas ?
A very important thing to do is to understand the high level picture of the vedas before getting in to the details. It is worth quoting the part of introduction to vedas in the book Rgveda samhita by Veda pratishthana.
"God, verily, is one, though variously described since the functions are manifold and His divine attributes many. Compareed to Him, we, the tiny little selves, are infinitesimals whilst He is Infinity in all positive parameters. To this divine one, ....., in the words of the Vedic texts, offers invocations in various adjectivals and adveribials, according to His attributes and functions. So often, we prefer to call Him agni, the foremost adorable, sometimes indra, the most resplendent, sometimesvaruNa, or the most venerable, sometimes as aryaman, the supreme law-giver; He alone is the divine virility and vitality in us, and is therefore known as rudra; He verily, is the savitR, since everything is born of Him; He is divya, or effulgent; He is the law-abider, and hence is known as yama; He alone is the measure and a benevolent friend to us, and hence, His name is mitra; He is the supreme Lord and therefore bRihaspati and brahman; He pervades the entire universe and hence He isviShNu; He is blissful and hence known as soma and on account of His benevolence and kindness, He is called, shiva, shankara and mayaskara. The Veda stands for the purest type of monotheism. Here er have a few texts to corroborate this concept.
1. tvamagne rAja varuNo dhRitavratastvam mitro bhavasi dasma IdyaH |
tvamaryamA satpatiryasya sambhujam tvamamsho vidathe deva bhAjayuH ||
God alone is one, though known as agni, king varuNa, mitra, aryaman or amsa.
2. tvamagne rudro asuro mahodivastvam shardho mArutam pRiksha IshiShe |
tvam vAtairaruNairyAsi shamgayastvam pUShA vidhataH pAsi nu tmanA ||
God is also known as agni, rudra, mahah asura, (ahur mazda) and pusan.
3. tvamagne draviNodA aramkRite tvam devaH savitA ratnadhA asi |
tvam bhago nRipate vasva IshiShe tvam pAyurdame yasteavidhat ||
God is agni, dravinoda (the giver of wealth), deva, savitR, ratnadha (the store of gems), bhaga (effulgent), and nRpati (lord of men).
4. indram mitram varuNamagnimAhuratho divyaH sa suparNo gurutmAn |
ekam sad viprAH bahudhA vadantyagnim yamam mAtarishvAnamAhuH ||
He is one, though seers call Him with various names, such as indra, mitra, varuNa, agni, divya, suparNa, garutmAn, yama and mAtarishvan.
5. tadevAgnistadAdityastdvAyustadu candramA |
tadeva shukram tad brahma tA ApaH sa prajApatiH ||
He alone is agni, the same He is aditya, the same one is known as vayu and candrama. He again is the same one known as sukra, brahman, Apar, or prajApati.
It is very clear from the above that Vedas priase only the Supreme reality. The various names used in the vedas like agni, indra are all the powers and perspectives of the same Supreme Lord shiva.
If we look at who these devas are, it is not hard to find that they are the (masters of the) elements which are essential for the life to go on. For example agni is heat, vayu is air, varuNa is water etc. These are nothing but the authorities provided by the Supreme for the smooth running of this Universe system, It has devised. These glorious God given powers are told and hailed in the vedas.
vEdam nAnginum meypporuLAvadhu nAdhan nAmam namaccivAyavE - sambandhar.
irukku n^AnmaRai IcaniyE thozum karuththinai aRiyAr kalmanavarE - appar.
balamabalamamIsham balvajAnAm vicintyam
kathamapi shiva kAlakshepamAtrapradhAnaiH |
nikhilamapi rahasyam nAtha nishkR^ishya sAkShAt
sarasijabhavamukhyaiH sAdhitam naH pramANam || 46 ||