I hear from a lot of new students that they know the chords and kind of know the rhythms of the tunes they're working on, but it still doesn't sound like "music". There are a couple very easy fixes for this problem that can vastly improve your playing quickly.
1. Set your tempo before you start playing. A metronome is really useful here. In order to really lock into a groove and deal with the subdivisions of the beat, you have to know where the downbeats (1-2-3-4) are.
Think of the tempo, or pulse, as a ruler that the rhythm is set against.
If you're not sure where the downbeats are listen to the song and tap your foot along with the groove. Those pulses you're tapping are the downbeats. You can also listen to where the drummer is putting the kick and snare hits. Drum parts can be very complex, of course, but the kick and snare hits will be very close to the downbeats most of the time.
Before you start playing, set your metronome and count yourself in with an empty measure.
2. Make sure your pick is moving in the right direction. In a downstroke your pick hits the bottom strings first. In an upstroke it hits the upper strings first. That may sound obvious, but it's also an expected (and very subtle) part of the sound of a guitar. So when your picking direction is incorrect, the music can sound almost right, but a little off.
Let's start with straight 8th notes (1&2&3&4&). Your should downstroke on the downbeats (1, 2, etc) and upstroke on the upbeats (&). Do this with your metronome set at a comfortable tempo.
Don't worry about hitting all the strings in both directions. We often don't in order to create some low/high texture in the strum pattern.
In some styles like rock, metal, and some blues, you'll downstroke all of the 8th notes for a more aggressive sound. Once you're comfortable with the double stroked 8th notes, the single stroked ones will come a bit easier for you. Always practice with a metronome and tap your foot along with it to help develop your "internal metronome".
3. Try out these 16th note patterns to develop a good repertoire of rhythm possibilities. If you're not familiar, 16th note get a quarter of a beat each and there are four inside one beat. We count them 1e&a, 2e&a, 3e&a, 4e&a.
The first set uses groups of four 16th notes, but leaves one out each time. The second set leaves two out each time. Treat each measure as its own exercise and loop it around a few times. Every rhythm you come across has one or more of these patterns as its basic structure. So playing through these will give you tools you need for nearly any situation.
You'll notice that, with 16th notes, you'll downstroke on the '&', whereas when we just had 8th notes that was an upstroke. That's exactly correct. When you're staring down a new rhythm that combines 8ths and 16ths, use the 16th style picking. If the rhythm has quarter and 8th notes, use the 8th note style.
IMPORTANT! Always keep your right hand moving. On the note that is "missed" make the stroke motion anyway, just without hitting the strings. So if the pattern is missing the third 16th note (the '&'), make the downstroke anyway, but don't hit the strings. The consistency of your picking hand motion is what will create a solid groove. Stopping and starting your picking hand leaves more room for rhythmic error.
These same variations can be thought of in 8th note grooves as well. Or 32nd notes, if you're a nutcase.
As you practice these patterns with your metronome and become more consistent with your picking hand you'll find that your grooves start to lock in a lot better and sound way more musical.
Need help figuring out rhythms that combine 8ths, 16ths, ties, and all that? Here's a step by step lesson on how to decipher any rhythm you come across.