I have a range (numbers) to be set. In most cases a lower value is better, however in some cases a higher value is better. How do I represent the same in my UI? To set up the range I just have two values. I want the solution to be subtle.
It's difficult to give good advice without more information about your interface, but as for the user's experience it can be confusing if 5 times in a row higher is better, and then suddenly lower is better. The user may be confused or have to stop and think even if you do communicate clearly to the user which is which.
Depending on your layout, if you're prompting a user to enter a value within your given range, it may be useful to using something like "(higher is better)" after the text prompt and before the input box, but I suggest standardizing them so that higher is always better, perhaps by reversing the question for the ones where lower is better.
I feel sharing a color code would be better. You can give a disclaimer saying that values with green are recommended, values with yellow are okay and values with red should be avoided. Then color code you UI values and the user can choose accordingly. The colors will help the user to understand the safer values to be used