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 Rigveda samhita by Veda pratishthana.
“God, verily, is one, though variously described since the functions are manifold and His divine attributes many. Compared 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 adjectival and adverbials, according to His attributes and functions. So often, we prefer to call Him agni, the foremost adorable, sometimes indra, the most resplendent, some times varuna, 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 savitri, 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 varuao dhritavratastvam mitro bhavasi dasma idyah –
tvamaryama satpatiryasya sambhujam tvamamsho vidathe deva bhajayuh ॥
God alone is one, though known as agni, king varuaa, mitra, aryaman or amsa.
2) tvamagne rudro asuro mahodivastvam shardho marutam priksha ishishe –
tvam vatairaruaairyasi shamgayastvam pUsha vidhatah pasi nu tmana ॥
God is also known as agni, rudra, mahah asura, (ahur mazda) and pusan.
3) tvamagne draviaoda 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 varuaamagnimahuratho divyah sa suparao gurutman –
ekam sad viprah bahudha vadantyagnim yamam matarishvanamahuh ॥
he is one, though seers call him with various names, such as indra, mitra, varuaa, agni, divya, suparaa, 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 nanmarai icaniye thozum karuththinai ariyar kalmanavare – appar.
balamabalamamisham balvajanAm vicintyam
kathamapi shiva kalakshepamatrapradhanaih –
nikhilamapi rahasyam natha nishkrishya sakshat
sarasijabhavamukhyaih sadhitam nah pramanam ॥ 46 ॥
– Atmarpanastuti