nerve cells are long and branched because it has to make a continuous chain with other nerve cells to transfer information to the brain. the message is carried by its branched part called dendrite in form of electric messages through axon to its end and then again from this end to the dendrite of the next other nerve cells.
The nerve cells are elongated as their main task is to transmit impulses over long distances.Nerves pick up electrical impulses from all over the body, and these impulses must travel along an unbroken path to reach the brain.