My friends and I have a discussion if Goku was bad or not before coming to the Earth, how can illuminate us?
Goku was a Saiyan, a warrior race whose desire was to be the strongest race in the Universe. He was sent to destroy the human race and sell the planet to another race. After falling into a ravine and injuring his head, Goku ended up losing his memory and was hence raced as a Human by Grandpa Gohan, which is why his overall personality is very comparable to that of Humans than Saiyans
So to answer your question,Yes. Goku was indeed sent to the earth initially, to carry out an evil task. However, his head injury and care from Grandpa Gohan was the reason why that didn't go about happening.