You ask for a letter of reference when you are looking to leave your position. If you have the support of your manager for that move then any time should be fine. However if you have just started a position then asking for a reference right away is beyond presumptuous.
The best thing to do is to cultivate a professional relationship with your direct supervisor. This way you can get their help in developing your career. If you do this when you it is right for you to move on you will probably have their support. This will also help turn a neutral reference into a more positive reference that will serve you much better.