From here, If it's a homework question:
If the question is tagged homework, I will post hints as answers, since I hate questions showing up in the "unanswered" queue despite being fully resolved in the comments.
If I strongly suspect the question is homework, I will post hints as answers to discourage others from spoiling full solutions.
Otherwise, if the hint is very short and I expect others will soon flesh out a full writeup (especially if the "hint" is just a link to Wikipedia) I will leave it as a comment.[user7530]
A lot of questions have a clear-cut answer that is right for them. For example, someone with little knowledge of a particular field might have a specific question about that field that someone who knew the area better would be able to answer. In that case, hints are pretty much useless. A lot of the time, however, the person asking the question could answer most of it on his own (I decided the sex of the questioner by tossing a coin) and has just got stuck somewhere. In that case, a hint is the best sort of answer as it lets the person asking the question think for themselves and gain a deeper understanding than a question would do on its own.
Between these two extremes, you have to use your judgement when answering a question. If you don't think that the person answering the question could answer it themselves, even with a hint, then don't just leave a hint. If you do, then leave a hint.
Note that leaving a good hint is harder and requires a deeper understanding of the subject than leaving an answer. It's also tempting to leave an answer in order to 'show off' your ... knowledge, though I think users of this site aren't particularly prone to that. I would find a really good hint more impressive anyway.
So, to answer your question: yes, I think that a lot of the time a hint is the best sort of answer and should absolutely be posted as one, rather than as a comment. Hint answers are one of your most powerful tools as an answerer.[Donkey_2009]
Leave it as answer so the question is no longer "unanswered" (assuming someone upvotes it). If you are pretty certain that the hint may not be enough but are not willing to expand the answer yourself at some later point, that's what the community wiki checkmark is for. If you know a short concise hint that may however spoil the fun of solving the problem, put it into a spoiler tag
But please don't leave a hint as comment. Comments are intended to clarify the question's intend or point out flaws in it.[Tobias Kienzler]