Original Answer: Lots of Guesswork
I don't think any currently-published materials address the effect of magic items on encounter difficulty, but the rules assume a certain volume of magic items-per-level, and the difficulty calculations and monster challenge ratings probably take that into account. However, if your PCs are exceeding the daily recommended allowance of magic items (very vaguely defined, but see addendum below), XP thresholds based on their true experience levels are almost certainly useless.
That being said, it's possible to compare the powers of magic items to the bonuses players get by gaining experience levels. A weapon that confers +1 to attack and damage rolls is functionally the same, in-combat, as gaining 2 points in the relevant ability score. An item that lets you cast a certain spell once per day is "the same as" gaining a spell slot.
Combat-oriented magic items denoted by the DMG as uncommon or rare have effects that amount to a fraction of the increase in power received by gaining a single level, at least in the low-level tier for which they're recommended (per DMG 135). At level 4, the Druid gets an ability score improvement (combat-equivalent to that +1 weapon), another 2nd-level spell slot (roughly combat-equivalent to that spellcasting item), some more hit points, and another hit die. So if you give both those items to a level 4 Druid, that PC is almost level 4, for combat purposes. You might want to calculate two different XP thresholds, treating the PC as level 3 and then as level 4, or you might want to split the difference between them.
This approach can't account for the versatility that magic items provide. To a Wizard who already can cast scorching ray, a circlet of blasting is a fairly disappointing reward, but to a hammer-oriented Champion Fighter it opens up a world of hands-free blasting possibilities.
Combat-oriented items denoted by the DMG as very rare or rarer provide bonuses that far outstrip the benefits of ascending from experience level 3 to experience level 4, and may even be equivalent to a full experience level or more for PCs at level 15 or above. I have no experience with high-level 5e and can't really speak to that. It's not hard to guess, though, that if you provide your players with a lot of very rare-rated magic items, your hopes of accurately calculating combat difficulty will fly out the window.
Addendum: Lots of Rolling on Tables
On close inspection, the DMG is actually fairly specific about how many magic items a party should get. It just happens to establish this in an extremely roundabout way. On page 133: "Over the course of a typical campaign, a party finds treasure hoards amounting to seven rolls on the Challenge 0-4 table, eighteen rolls on the Challenge 5-10 table, twelve rolls on the Challenge 11-16 table, and eight rolls on the Challenge 17+ table."
Rather than reproducing the Challenge 0-4 table and the many tables it references, I'll present here only a few relevant values. A treasure horde generated for CR 0-4 has:
- 36% chance of no magic items.
- 24% chance of 1d6 items from Magic Item Table A.
- 15% chance of 1d4 items from Magic Item Table B.
- 10% chance of 1d4 items from Magic Item Table C.
- 12% chance of 1d4 items from Magic Item Table F.
- 3% chance of 1 item from Magic Item Table G.
Now, Table G is a level 4 adventurer's dream. You have a 10% chance to get a +2 weapon, which is categorically overpowered for this tier. If that's not broken enough, you might end up with a mace of disruption or a wand of wonder. A 3% chance of rolling on this table at this tier seems like a bit much to me, but I'm no wizard of a coast.
This is what the guidelines tell us, though, so let's pretend to roll 7 times on the Challenge 0-4 table. If we apply my liberal arts degree's understanding of the law of averages, I predict we'll end up getting no magic items twice, roll a total of 2d6 times on Magic Item Table A, and roll 1d4 times each on tables B, C, and F.
Table A is 98% consumables and a couple of fairly mundane utility items. Rolling 7 times, we'd probably get 3 or 4 potions of healing, 3 or 4 low-level spell scrolls (hopefully from the spell list of a caster in your party!), and maybe—if you're really lucky—a driftglobe.
Table B is 64% consumables, a few somewhat more interesting utility items, and a very few items like mithral armor with fairly remote combat applications. We'll probably get a couple of fun potions, but let's say we picked up that mithral armor. I won't tell if you don't.
Rolling twice on Magic Item Table C, we might pick up a necklace of fireballs, but far more likely we'll get a couple rare-ish potions.
On Magic Item Table F, we're looking at stuff like a +1 weapon, a circlet of blasting, or some gauntlets of ogre power. That is, a couple of those "combat-equivalent to gaining part of a level" items described above.
By the end of the level 1-4 tier, we've amassed (and likely consumed) quite a few potions and scrolls. Their effect on combat isn't nothing, but it's not really enough to impact any combat difficulty calculations.
Despite several opportunities to pick up some overpowered weapons or equipment, our permanent acquisitions are probably limited to two or three rare-grade items. And these we have to split among the whole party! Only a very greedy and very lucky PC will be carrying enough magic items to be treated as one experience level higher for combat purposes. It might not be a bad idea, though, to calculate your XP thresholds as if one PC is one level higher, if the efficacy of one additional experience level is spread out across the entire party.
I will spare you my "calculations" for your campaign's treasure horde yields in the level 5-10 tier and above, but I notice those tables continue to draw a lot from magic item tables A, B, and C. Following the guidelines on page 133, PCs can't really rely on these treasure hordes to contain permanent magic items until the level 17+ tier. Suddenly the limit on attunement to a maximum of three items doesn't seem like a huge deal!
Of course, relying exclusively on these tables is going to make for one boring campaign. So many potions of giant strength! Magic items are used best as storytelling props, hand-picked for their roles in the scenarios you create. But the printed guidelines clearly intend for a given PC to pick up only a small collection of permanent magic items over his or her career. I can conclude with some confidence that the intended magic item distribution is so sparse as should not affect encounter difficulty calculations.
But that conclusion answers a different question! For present purposes, the upshot to this excess of analysis is that we now have a benchmark for what the 5e rules consider the correct number of magic items ("not very many"), and can gauge by our distance from that figure how overpowered our party is for purposes of encounter difficulty calculation.
Glib Extra Answer
If your PCs have so many magic items that the monsters you pit against them are no longer a challenge, try giving some magic items to the monsters.