Ignoring glitches/exploits, there is some leeway in the order that dungeons can be completed. With the exception of Dungeon 9 (you must beat the previous 8 dungeons for entrance), you do not have to complete any of the dungeons to complete another one. Some dungeons require you to retrieve items from a different dungeon to either gain access or complete it. (I have omitted bombs and keys as a requirement, but they are probably the most useful tools to make it through the dungeons)
- Dungeons 1, 2, and 3, can be completed in any order.
- Dungeon 4, requires you to get the Raft from dungeon 3 in order to enter.
- Dungeon 5 requires the ladder to complete (available from dungeon 4)
- Dungeon 6 requires the bow + arrow and ladder to complete.
- Dungeon 7 requires the magic flute to enter (from level 5), requires the ladder and bait (bought in various shops) to complete.
- Dungeon 8 requires the candle (bought in a shop) to enter.
Once you are inside a particular dungeon housing one of required magic items for a different dungeon, there are no required items besides bombs and keys to retrieve the item.
Now, this is not to say it is a good idea to do them out of order. The sword upgrades are only available once you get a certain number of heart containers. In order to easily kill monsters in higher numbered dungeons it is advised to complete the lower numbered dungeon so you can get a new heart container and potentially gain access to an upgraded weapon.