I am relearning guitar by myself with the help of the web. I have studied music theory and started to sight read. When I have easy sheet music for the guitar (Ode to Joy for example), I tend to play in frets 5-8, because I am very comfortable with the notes in that area, when I try to play frets open-3, I get confused. I know it is all about practice, but is there a rule as to where middle c is in the guitar? low e string, 8 fret? or A string 3 fret?
That's the beauty of the guitar, same note in multiple places.
As a rule of thumb the position ideally suited for sight reading a piece would be the position that covers most of the range in the song. So you would scan the piece and search for highest and lowest pitch. If you're lucky you can get in all in one position.
That doesn't mean that's the best way to play it. Pieces often sound better with open string voicings and will require shifts. Most well written classical pieces have the fingering and position notated so it shouldn't be a mystery.
There is a logic to learning sight reading in different positions and I would highly recommend getting William Levitt's books on modern guitar 1-3. His approach is not the only way to do it and I would not recommend forgoing all others but Levitt's approach is very logical and he covered all positions in all keys with a good set of exercise and etudes.
A classic book on classical guitar is Carcassi. That goes over every key that can be played in open position, in open position with scale exercises, progressions, and songs. Even though it is classical technique I highly recommend all guitarists work through this text. Much is it is repeated in Mel Bay's books 1-7.
So, in short, you can play your piece anywhere that covers the range but you may want to play around to find the best sounding and best feeling position. And shifting is likely to be a good idea.
Where notes are played on guitar are often a choice of the player. Fatter strings will give a more mellow sound, thinner less so. The further up towards the dusty end you play, the closer the frets are, which can be good - or bad.
Mixing open strings with fretted can result in tone changes which may not be good - except when the open notes are an accompaniment to the melody, and are easier to sustain, open so no finger needed. Using vibrato isn't easy with open strings, though!
Multiple places to sound the same note means essentially knowing your way round the fretboard, so you can make the choice. My students are expected to play 5 or 6 note phrases in several different places; it helps them to move around, and hear the often marked difference in tone, and also to end on a particular finger that is advantageous for the next phrase. So, fingering becomes an essential part of 'which string/fret shall I use?' It's well worth finding different ways to play the same tune. At some point in a concert, Brian May broke a string. The solo was still played, because he knows his way round, and just moved everything so that string wasn't even used.
Certain notes have even more than the expected six different places to play, interestingly...