There are two components to building an encounter, I'm going to reiterate them even though you seem to have them, just so we make sure we're on the same page. These rules are laid out in the DM guide document of BD&D and should be much further expanded in the DMG.
CR only sets the maximum (not minimum, lower CR critters are designed to challenge in increasing numbers as you level) value for which a party should be facing. Generally you don't want to throw a CR 4 monster at L3 PCs (though you might on occasion if you want an especially deadly encounter).
the XP budget for the encounter type and number of characters is your primary source for building encounters, you take the appropriate budget number for each of your PCs and add them up (so for 4 L4 PCs that need a moderate challenge, your budget is 600). Make sure to factor multiples of the same monster as an adjustment to the XP budget (so if you wanted your PCs to fight a horde of goblins at 50 XP each, you'd need to factor that in. (you don't want them to fight 9 goblins, you want them to fight 4 or 5).
If you're doing those two things, WOTC thinks that you'll be balanced. However, this definitely does not mean your party will not wipe what supposed to be a hard fight easily and struggle with what's supposed to be an easy fight. In fact I expect them to.
The reality is that some encounters are simply a bad fit for your party composition, or a bad fit in general for that level of character. Other times encounters are an excellent fit and you've got an easy one on your hands.
The important thing, ultimately, is to learn the capabilities of your group and to identify the types of monsters and challenges that are hard for them and that they can overcome easily. This is obviously a lot more work than WOTC's advice on the subject. However, every group is different and it would be quite hard to give advice that works for everyone.