I think at the front is more practical in a mud/loose terrain type environment, like the german tanks with the driveshaft from the motor going along the hull floor to the transmission/final drive in the front which also gives a little more "armor" in front of the crew (IDF Merkava has its whole powerpack in the front to increase crew surviveability), but having the whole powerpack modular and removable as one in the rear (like WW2 russian/american tanks and now modern stuff) is obviously better for maintence/overhaul work.
Sprocket at the front: mud/gravel/crap has time to fall off as the track passes over the return wheels - obviously large rocks will have a hard chance getting jammed this way
Sprocket at the rear: crap goes off the bottom of the track and straight into the sprocket. Large rocks/metal bars etc can be lifted into the sprocket causing havoc