Difficulty is now hard coded at 512 (so it doesn;t matter what you set in your miner). As it has been explained many times, difficulty by itself will not change your earnings in the long term. You will get less shares but each will be worth more so it's virtually the same. It only matters for short term because luck/variance play their part and it might seem inconsistent. Just let it settle and choose a longer time frame (24h+) to see that the results are the same.
the 512 diff will probably be forced forever (may I suggest 1024?

) so it doesn;t matter anymore but here are some old guidelines:
I actually lied a bit. It is by default hardcoded to 512, however, if you send d=1024, you'll still get 1024

Very few people were using it, so it slipped my mind!