Trying to connect 12V DC irrigation pump using Relay and power supply

Maybe you set pin 8 as an output with pinMode, but not pin 10?

Difficult to say though; you should post your code.