As I heard it, they were given a GBC dev kit and were told that the GBC was approximately the same as a portable NES. The head of the team needed more than just that ballpark though, so he decided to run the system through it's paces by feeding it an NES game, and observing exactly how much better or worse it was than an NES and in what areas. Instead of using one of Capcom's NES games for his test though, he broke Nintendo's copyrights and used an illegal ROM of Zelda 1 he got off the internets.
His team was having some trouble with the kit and called Nintendo for help, and Miyamoto was personally doing the rounds on developer assistance at the time, so when Miyamoto himself showed up on their door, they were afraid that he was going to freak out on them, but he just looked at their test work and started helping them without batting an eye, and while chatting said that he was too busy making console Zeldas to work on handheld Zeldas, and asked if they could give him a hand with them.
Their original plan was to make three games, a port of Zelda 1, a port of Zelda 2, and an entirely new one of their own design. Then the plan changed to forget the ports and just make three games of their own design. When that became too much for them, they slimmed it down to two (the Oracle games).
For the GBA, they made a Zelda 3 port (which actually got released this time) and paired it with their own game, Four Swords. Then they also made the Minish Cap.