Q:

Why did Voldemort take Nagini with him to the battle at Hogwarts?

Voldemort feared death more than anything. In that case, why would he take Nagini with him to the battle of Hogwarts where she could be killed, in turn destroying a piece of Voldemort's soul?
Why would he let a poorly protected piece of his soul strut about on the battlegrounds? A simple Avada Kedavra (a legal curse during the war) by one of the Order's stronger magicians would have killed it. 

A:

This is addressed in Harry Potter and the Deathly Hallows.

Voldemort is convinced that the safest place the snake can possibly be is with him

He would visit the Gaunt shack first, then, and take Nagini with him:
  he would not be parted from the snake any more … And he strode from
  the room, through the hall and out into the dark garden where the
  fountain played; he called the snake in Parseltongue and it slithered
  out to join him like a long shadow …

Voldemort seems to be casting some sort of high-level continuous protective spell to keep Nagini from harm. Presumably when he takes her to Hogwarts he's also periodically casting charms to keep her safe.

‘It is the only way, Nagini,’ he whispered, and he looked round, and there was the great, thick snake, now suspended in mid-air, twisting gracefully within the enchanted, protected space he had made for her, a starry, transparent sphere somewhere between glittering cage and tank.
  With a gasp, Harry pulled back and opened his eyes; at the same moment his ears were assaulted with the screeches and cries, the smashes and bangs of battle.
  ‘He’s in the Shrieking Shack. The snake’s with him, it’s got some sort of magical protection around it. He’s just sent Lucius Malfoy to find Snape.’

