Unless you ride the bike on the trainer alone, normally on the front wheel is better because it's closer.

Most computer don't have a long-enough wire to get to the back wheel, or if it's wireless the transmission might not be so good...