Sin as a condition is separation from God. A sin as an action is an action that brings about such separation from God; such an action "misses the mark," which is the Greek word for the act of sinning. This is the general---very general---rule of thumb. The trick is to tell what separates us from God.
A good rubric, for those who already know in their heart of hearts what is right and wrong, is that given by Mississippi comedian Jerry Clower in his album Classic Clower Power, disc 2, track 25 "You're Fixin' to Mess Up" (cf. http://jacksonianlawyer.wordpress.com/2009/07/25/some-sage-words-of-advice-from-the-legendary-jerry-clower/). For the sake of those yet unable to endure heavy Southern accents, here is the rubric distilled:
If you’re fixing to make a decision about what’s right and what’s wrong in your life, do you ask other people’s opinion about it? That’s a pretty good indication you're fixing to mess up.
Number two: do you argue with yourself? ...if you’re arguing with yourself, [that's a] pretty good indication you should not do it.
Number three: do you feel uneasy when you do it?
Number four: Can you give thanks and say ‘Lord, I thank You for providing this for me.’? The Bible says, give thanks for all things. So when you do it, can you say ‘Lord, thank You for providing this for me. [Indeed, I thank You] for [making things the way they are, so that] I can commit to what it is I’m doing.'?
What is right or wrong? Do you ask other people? Do you argue with yourself? Do you feel uneasy when you do it? Can you give thanks and say ‘Lord, I thank You for providing this for me.’? If you can’t, you [had] better watch out…you’re fixin’ to mess up.
N.B. in Southern dialect, to be fixing to do something is to be about to do something.
At the root of sin is self-will and insistence upon our own way at the expense of submitting ourselves to our Father in heaven Who knows better. The resulting cognitive dissonance brings about the signs 1--3 above.
Edit: as @Jürgen A. Erhard has pointed out, this rubric is insufficient on several counts. In my opinion, this is because it displays the signs of cognitive dissonance, which (thank God) accompany a struggle with temptation. These signs are useful in a sort of basic triage to call oneself to attention: if experiencing the signs in this triage (or quadriage), mustering all your dispassion, immediately ask yourself, "Have I committed to doing something wrong, and am I now only trying to justify myself and my wrong actions?"
However, cognitive dissonance may also accompany any difficult decision, which is not necessarily a result of wrongdoing. Also, weighing both sides of a difficult decision is, presumably, an attempt at wisdom and not an attempt at self-justification; and furthermore, asking someone else (whom you respect as someone following the truth, not just someone whom you know will agree with you) is a manifestation of humility. So perhaps at the root of Clower's observation is that one must flee all appearance of sin: in particular, the self-justification that accompanies an assent to sin.
This is a way to tell if you are doing wrong. It is another story to tell what is right, i.e. what is best.