Why did WICKED want to kill Thomas in the first place?
In the Maze Runner, we know the Thomas was sent to the Glade. It is said that when Ben attacked Thomas, (and in the books Alby was controlled by WCKD to kill himself by choking himself to death) it is obvious that WCKD tried to kill Thomas through Ben.
The Grievers are also controlled by WCKD, because they have that 'key' located within the creature's body.
So with these explanations, and for more explanation that WCKD thought Thomas was *special** in some way and thought that he must be a very good candidate for immunity testing (he became the chosen one). As said by the Chancellor:
Thomas continues to surprise
So if they wanted him alive and well, why did they get the Grievers to try and kill him when Thomas dashed out into the Maze to help Minho and Alby?
Also to mention; obviously WCKD also had control over the collapse of the maze when Thomas and Minho found the Griever hole the day Thomas became a runner, they tried to kill both of them that way.
Why was WCKD so eager to kill Thomas off the whole time when he was so valuable to them?
They don't want to kill him, they want to study his brain. All of them, not just Thomas. As ridiculous as it may sound, this is the movie plot:
There's an incurable brain virus (The Flare), and there are people who are immune, so they put those people in a maze then put them through multiple ordeals (including a lot of things trying to kill them), so they can see how their brains work.
They don't necessary care if they (including Thomas) survive or not, if they did, it's better but the more important is to try to kill them (I'll repeat) to study their brains!
And Thomas didn't start "special". He's "special" because he survives.