We are given that 'SUN' is written as 'RWK' and 'MOON' is written as 'LQLK'. We need to determine the pattern from the given codes.
- 'S' is coded as 'R', 'U' is coded as 'W', and 'N' is coded as 'K'.
- Similarly, 'M' is coded as 'L', 'O' is coded as 'Q', and 'N' is coded as 'K'.
By analyzing these, we see that each letter in the word is replaced by a letter that follows a consistent pattern of shifts. Following the same pattern, the word 'STAR' will be written as 'RVXV'.
Thus, the correct answer is \( \boxed{RVXV} \).