Most wobbly riding comes from upper-body tension. Consequently, if you can relax your neck, shoulders, arms and hands while biking, you'll find that you're a lot less likely to weave.
Shrug It Off Two things that can help ease tension are regularly shrugging and dropping your shoulders, and bending your elbows. What happens is, as you tighten up during a ride, your shoulders ride higher and lock up close to your neck. Shrugging every 15 minutes or so and relaxing your arms really helps relieve this stress.
Check Your Tension Level A good gauge of relaxation level is upper-body fatigue. If you finish rides with stiff arms, sore hands, tight neck muscles and hurting shoulders, you're definitely riding with too much tension in those areas. Ideally, when riding, it feels like the legs are doing all the work and the upper body is as relaxed as can be. In fact, the only times the upper body comes into play is on steep sections when you must stand and muscle the bars a bit to get over the hills and during sprint-like efforts.
The Less You Try, The Easier It Becomes Remember that all bicycles are designed to track straight with no help from you. The less you try to ride straight, the easier you may find it to be to actually head straight. It's great practice to try to follow the white line on the road. But, don't stop paying attention to road hazards! And, don't ride directly on the white line, which can become slippery in certain weather conditions.
A Little Help From Your Friends It can also help a lot to ride with friends who are better cyclists because you'll see how easily they ride straight and you'll be able to follow their lead. Following a wheel and having someone behind tracking your steadiness may help, too (though you may have to put up with some snide comments).