Expect PvP on PvP realms
This should be obvious. The first rule that I follow is that PvP on a PvP realm is fair game. If you're in an area that automatically flags you, such as zones beyond the starter areas, then it's all right to engage an enemy. My sympathy goes out to players who only play on a PvP realm because most of their friends are playing on it -- my wife being a prime example -- but those are the rules of the realm. If you're on a PvP realm, adapt to the environment and expect PvP at all turns. I must constantly remind my wife when she encounters differently mannered players who don't quite follow the same unwritten rules to keep her cool and remember that we play on a PvP server, where ganking (and griefing) happens with some regularity. She won't like it, but she'll take it like a trooper. At least, she will until I make my way out to where she is and make it a fair fight. This brings me to my next point ...
Fight as fairly as possible
I'm not a big fan of griefing. I know it happens, and on a PvP server, I really can't argue against players who would like to exercise their power over others, but to me it's simply not real PvP. I enjoy PvP for the challenge and the thrill, so jumping on a character several (or many, many) levels below just doesn't appeal to me. Where's the fun in taking on a player who can't really fight back? It's called an honorable kill for a reason. When it comes to fighting fair, I have a subset of rules that -- in my mind -- define a fair engagement.
The level difference should be minimal. A rule of thumb is that players who are 10 or more levels below simply don't stand a chance against you, so that effectively removes them from contention. If you initiate an attack against a "gray" character, you're just being an asshat. On the other hand, if a lower-level character initiates combat, then it's fair game. I don't mind attacking other players who are several levels above me, but I also understand that if I get my butt handed to me (probably over and over), it's all part of the deal. Sometimes I take on opponents who are "red" or even "skull" to me simply because I want to test my character's limits and practice mobility. In those cases, I'll almost always get slaughtered, but at least nobody can say I had an unfair advantage.
Many times while leveling, I've been jumped by characters many levels above me, and there've been many instances where I've been able to hold my own. If you put up a good enough fight, genuine griefers will leave you alone because nobody wants to be beaten by a much lower-level character -- especially not cowardly players who only engage you thinking they're sure to win because of the level difference. A difference of one to three levels should probably be considered fair, whether attacking or being attacked. And personally, I would rather be attacked first.
Attack only when attacked. One of my most unpopular self-imposed guidelines is that I never attack first. Many of my friends on PvP servers don't agree with me on this one, but unless you're a rogue (I'll explain this in a while), I don't believe you should attack first. This is a completely arbitrary rule that flies in the face of the "kill or be killed" philosophy that generally permeates PvP realms, but it's one that affords me two things: moral high ground and a genuine challenge.
Not attacking first gives me the "they started it!" excuse to go all out. I have no qualms about killing and corpse camping players who initiated the fight. In fact, I'll actively do it and won't hesitate to attack and kill a newly rezzed player at half health if he was the one who attacked first. Waiting for an attack is also an indication that the enemy is willing to fight you, which makes the engagement consensual. I don't want to fight a player who isn't in the mood to fight or isn't capable, one way or the other, of fighting back on even footing. Letting opponents have the first strike is a good way to establish your opponent's willingness -- and capability -- to provide a good, fun PvP battle. There's a reason my favorite spec in the game is retribution.
Admittedly, letting enemies strike first is a big disadvantage, so only follow this rule if you're willing to sometimes lose the first engagement. It's easy enough to run back to your body, full up and strike back. That said, there's absolutely nothing wrong with attacking first, especially if you're a rogue. Attacking by surprise is part of the rogue kit, and there's really no way they can get off on the right foot if they're the ones who are caught off guard.
Don't be a vulture. If you must attack first, then at least have the courtesy of attacking a player with modest health to make it a fair fight. Nothing irks me more than the scavenger-like behavior of players who see enemies at low health and take the opportunity to strike. I think it's underhanded and dishonorable. I know several players who enjoy this type of behavior, killing other players who are engaging other mobs and are low on health. You may get a killing blow, but where's the challenge in that? Players who do this aren't looking to PvP. They're looking to make life difficult for other players, and that's just not being very good.