If they don't mention a specific prophet then it should be completely acceptable. The term "God" refers to a singular deity, not Jesus, Muhammad, or any other religious figure. The majority of religious folks are part of a religion that is monotheistic, thus they praise a singular figure, referred to as God, which is why the phrase "One nation under God" is allowed to remain in the Pledge of Allegiance in public schools. Many people hear "pray" and think Christianity, but the act of praying is simply offering thanks to, or asking something of, your God, who/whatever it may be.
To offer another point, no one is forcing you to pray. If you don't believe there's a bearded man in the sky then don't talk to him. If you're firm in your beliefs then everyone else praying shouldn't bother you at all. Let people believe what they want.
The Valedictorian speech is a different issue. They're not employed by the state, school, or government, nor is school in session while their speech is being given. As such they are more than welcome to thank, or praise whoever they like during their speech. You may not agree with what they say, but, again, no one is forcing you to agree. If their speech is (or seems) to be offensive, or abusive towards a group you are a part of (in this case atheists) then it is a matter to be brought up with the person, not the school district.