Learn your scales. The scales are about half the possible notes, so by knowing the scales you double your chance of hitting a good note. Almost every note in a riff is taken from the scale of the key you are playing in, and when a riff is stepping up or down, the next note you play will almost always be the next note in the scale. If you just play part of the scale for a few beats it will probably sound good. Don't forget to learn the Blues scale along with the regular Major/Minor scale. A lot of rock riffs are simply a few notes taken from the Blues scale at the right time and place.
Most simple chords have three notes -- which may be duplicated. More complex chords like 7th chords will have four notes. Some of the jazzier chords will have more. You should know how to play the notes of any chord anywhere on the neck of the guitar. When a chord goes by in the harmony, you can always sound right by playing the notes in the chord. The chord notes also give you a starting place for riffs. If an A major is going by in the harmony, you can make a respectable totally improvised riff by doing something on the three notes that make up the A chord (A, C# and E), being sure to start the phrase on the beat and on a chord note.
There are several standard rock cliches -- and classic riffs. You should know how to play them in any key. Know them well enough that you can thrown in one -- or part of one -- when it is needed. Practicing these will put them in your subconsciousness and they will appear -- sometimes inverted or otherwise twisted -- in a moment of improvisation. Practice them slowly until they are absolutely correct. It does not matter how fast you can play them incorrectly. Recycling masterpieces is standard fare for any art form.
Ideally, the fingers should press the string straight down into the fretboard at a 90-degree angle with the minimum force and at exactly the right time. This is of course impossible, but you should realize what the ideal is and do everything possible to get as close as possible. Curving your fingers -- and keeping your left thumb in the middle of the back of the neck -- will position the fingers as close to 90 degrees as is humanly possible. This will not work for playing chords, but it will definitely speed up -- and clear up -- your lead playing.