You can improve a lot by playing a weaker opponent and also ensure more fun for him or her by using the match as an opportunity to expand your comfort zone. If you're a rock-solid baseliner who would beat someone easily staying back, use the match as a chance to practice those serve-and-volley and chip-and-charge skills that aren't so solid. If you're one of the many one-handed backhanders who can slice till the cows come home, require yourself to hit at least half of your backhands with topspin. Try taking more balls on the rise, hitting more drop shots, or placing more serves into your least favorite corner. However you challenge yourself, your opponent will enjoy winning a few more games, and you'll be more versatile against some tougher opponent when you really need it.
If everything averages out as it should, you'll end up playing a fairly even mix of players who are stronger, weaker, and roughly the same as you. We all have better and worse days in terms of readiness and sharpness, so try to schedule the tougher matches for when you'll be at your best, and if you thereby end up playing weaker opponents on the days when you tend to be worn out from work or school, enjoy the challenge of making the best of your game when you're not 100%. Your main focus should be climbing your ladder of increasingly tough opponents, but every match will be an opportunity to improve.

