You only need to do this if you are looking for balanced encounters
The answer by Dan B already clarifies that from a technical perspective, you cannot simply lift the same challenge ratings and expect that to work. If that is needed however depends largely on your play style.
You already mentioned this is for a home game, not for published material where your readers's expectations rightfully would be that the encounters are balanced for character levels as is common for 5e.
And you may even prefer to do this for your home game, if the style of play you have is the typical, "safe" 5e style, where players can expect to encounter only challenges balanced to their power.
However, if your players understand it, and you all agree, you can instead opt to play a more "old school" play style, where encounters are not always balanced to the player characters level. Some may be deadly in the true sense of the word: trying to win them by force can easily result in a total party kill. Of course it is for the DM to signal to the players if that is the case, so they can opt to negotiate, evade or retreat in time. If you play like this, balancing challenge ratings is not that much of concern, unless the entire adventure turns into a death walk.
This may also make your goal to play older material much easier in terms of conversion: just use the same monsters. It does not matter much what their CRs were and now are. If its a goblin, use a Goblin. If its a drow mage, use a Drow Mage.
I have some practical experience with this. We played through the old "Against the Giants" adventures from 1e, and I effectively ran them as-is, just replacing Hill, Frost and Fire Giants with their current 5e equivalents (and only converting some of the monsters for which there was no 5e version). This made these adventures A LOT more deadly. Giants got a big power boost between 1e and 5e.
It also made the adventures very interesting. Faced with opponents they know they could not simply beat in combat, the player characters approached these adventures as inflitration missions, sneaking, sleuthing and magically scrying the territory before making surgical strikes. They succeeded in stealing the Hill Giant chieftain's treasure from his basement, and in assassinating the Frost Giant jarl in his bedchamber.