There are 2 general rules:
1. Tight enough that that there is no slack with maximum load on your rig. That would be when you are heeled around 20 degrees. This is the best approach. Of course, you need to tighten opposing stays together to keep the mast straight.
2. Uppers at 15% of breaking strength of your upper/cap stays, lowers at 10%. That ends up a little tight on our Hunter 27 (with 3/16 stainless stays.)