The first と between 水 and 光 is "and".
The second と before します is part of the A + を + B + とする construction, which means "to think of A as B", "to use A as B", "to consider A B", "to make A B", and so on.
You can find other verbs that take this type of と in this answer.
So Aを必要とする can be translated very literally as "to think of A as necessary", but you can think Aを必要とする is a set phrase that just means "to require/need A".
植物は水と光を必要とします。
Plants require water and light.
植物に水と光を必要があります is ungrammatical and makes no sense (ある is the only verb in the sentence, but it's an intransitive verb that never takes を).
I was taught 必要があります-- Which were you taught, 「Noun+の+必要があります」construction (eg 再検査の必要があります), or 「Verb+必要があります」 construction (eg 検査を受ける必要があります) ? ....... By the way, we also have 「Noun+が必要です」 eg 植物(に)は水と光が必要です。 – chocolate Oct 16 '23 at 14:24