Check his teeth (while wearing an old jacket and gloves if you don't like the smell), if he is broken mouthed he will be (well) over four years, full mouthed should be three to four, maybe five. Also look at is feet (to see if he has been looked after well and is not lame, lame boys don't like to work), ask to see a valid CAE certificate - if he hasn't got one, make it a condition of sale to get a test done by the current owners. Also see how easily he is handled, if he is difficult it will be quite a struggle for you to handle him in new surroundings. Has he got any mates to come with him, and/or do you have suitable company for him at your farm?
Check that he has progeny (registered?), if not registered, ask to see names and contact details of new onwers of offspring. It is quite difficult to ascertain that he is fertile, my tup last year was very eager and by all accounts properly serving the ladies, but just firing blanks, and there were absolutely no signs or possible reasons for it... tests for fertility can be quickly done by the vet, not sure about costs, but it is not that expensive.
What breed are you looking at? Is he registered? If not you really have to go with your instinct (if you don't know the current owners). Well kept boys do work until they are about 6 or 7, but need to keep in good condition.