No, it doesn't refer to Spartans. It is a rhyme that doesn't translate well into English and is on the same level as ligma or joe mama jokes.
Whenever someone ends their sentence with 300 a quick-witted individual may reply with "suck a tractor drivers cock!". 300 and "tractor driver" rhyme in this case in Russian, bringing the desired comedic effect. As you can imagine teenagers love it and even try baiting their friends into saying 300.
You can find many words that rhyme with any word for a dick in English and make this joke free of charge. I will start:
Sure. There's a thing in a lot of languages called grammatical cases. In basic terms cases make a word "adhere" to the rest of the sentence. Different languages have different amounts of cases. For example, German has four, Ukrainian – seven and Russian – six cases for nouns.
In this case the word тракторист would change to тракториста and it rhymes with триста.
On a side note, "jokes for 300" is a template response for joke, referencing to a lockal jeopardy! show equivalent. This response means that joke was mediocre at best.