A lot of guitarists worry about sight reading.
With the guitar, you just need regular, daily practice. Another thing to consider is not trying to read music that is beyond your technical capabilities. You need to "hasten slowly" as it were.
A good habit to get into is to read the piece 'mentally' before actually playing it.
Just take a minute or so to familiarize your self with the piece. This will help you notice any 'danger' areas before you actually play it and you will find that you actually have more confidence when you play.
Also, you should not try to play the piece too fast although it should be as close to a performance as possible.
You'll find that as you get better your playing will be closer to actual speed more and more until it becomes second nature to you.
It's like anything when you begin - it's hard!
Given time and quality practice it'll become easier. Another thing to remember is not to get too fussed about mistakes and keep going back to start again when you sight read.
Just play the piece at a slower tempo and "roll with the punches" accepting any mistakes for what they are...that's right! - learning opportunities!
According to David Braid writing in Play Classical Guitar the Ninth Position of the guitar is important when you sight read...
"...not only because it completes the fingerboard, but it's also another very commonly used position - finger 4 plays the 12th fret here (the octave point)."
The point being made is you need to know certain positions and points on the guitar as it makes it easier, especially in the higher positions so spend a little time to pre-learn these.
Here is a graphic of what he means...
Be patient! That would be my advice because it takes a good deal of practice and patience to memorize all the notes on the fret board.
Additionally, don't forget your shortcuts i.e. notes that repeat on the strings and in different positions.
This happens with great frequency on the guitar and you can almost halve your work if you focus on these concepts.
Additionally, you might use these great books by Robert Benedict...
Robert Benedict's "Sight Reading for the Classical Guitar Books 1 and 2" provide various advantages for classical players. The following are some benefits of utilizing these books:
Developing Sight-Reading Skills: The main objective of these publications is to aid guitarists in developing their capacity for sight-reading. Sight-reading is the capacity to instantly read and perform musical notation. Guitarists may improve their reading abilities and perform music they have never seen before by going through the exercises and pieces in these books.
Gradual Progression: The books' organizational design progresses from easier tasks to more challenging ones over time. As they go through the content, novices may start at a level that is suited for them and progressively develop their abilities. With the help of the books, students may acquire sight-reading in a methodical way that guarantees a smooth and constant advancement.
Technical Skill Development: These publications emphasize technical skill development in addition to sight-reading. The compositions and exercises in the books often concentrate on certain technical difficulties including finger dexterity, coordination, and musical expression. Guitarists may improve their general technique and their sight-reading skills at the same time by working on these exercises.
Prepare for a solo performance by: These books will help you develop sight-reading abilities that are useful for solo performing circumstances. Guitarists will gain increased confidence in their capacity to approach and execute new music properly, even without a lot of practice. Professional guitarists may benefit greatly from having this expertise since they often play unfamiliar compositions in different performing contexts.
Overall, "Sight Reading for the Classical Guitar Books 1 and 2" provide guitarists a road to improve their reading skills, technical proficiency, and musical repertoire via a planned and progressive approach to sight-reading growth.
Here's what Wikipedia says about the 'psychology' of this skill in music...
"The ability to sight-read partly depends on a strong short-term musical memory.
An experiment on sight reading using an eye tracker indicates that highly skilled musicians tend to look ahead further in the music, storing and processing the notes until they are played; this is referred to as the eye–hand span.
Storage of notational information in working memory can be expressed in terms of the amount of information (load) and the time for which it must be held before being played (latency).
The relationship between load and latency changes according to tempo, such that t = x/y, where t is the change in tempo, x is the change in load, and y is the change in latency.
Some teachers and researchers have proposed that the eye–hand span can be trained to be larger than it would otherwise be under normal conditions, leading to more robust sight-reading ability."
You can see the full article here...