You were playing Pokemon Red or Blue, and this is known as the Missingno glitch. This glitch is rather interesting, so I'll include some details on how it works.
Essentially, there was an oversight in the code that made the right edge of Cinnibar Island (where there's the black-ish border) have some unique properties. It counts as a zone where wild Pokemon can spawn, but it also does not specify which Pokemon should spawn there. Because of this, it always uses the Pokemon that were in the last zone that you visited. Thus, it's useful for catching rare Safari Zone Pokemon, because you can battle them for real, putting them to sleep and damaging them, rather than relying on the luck of the Safari Ball.
But that's not enough to explain how Missingno came about. There's more to it. Here's where talking to the Weedle Man comes into play.
When you talk to the man in Viridian City who teaches you how to catch Pokemon by demonstrating on a Weedle, there are some interesting things done with the game's memory state. Pokemon uses all the memory available on the old Game Boy cartridges already. But at this point in the game, it wants the player's name to show as "OLD MAN" rather than whatever the player chose.
In order to do this, it must copy the player's name to an unused portion of memory. Namely: The area where the Pokemon spawn rates for the current zone are stored. Usually this hardly matters, because when you enter a new zone, those values will be overwritten by the ones for the new zone. But if you go straight to Cinnibar Island and ride up and down the coast, some weird things start happening.
Since it doesn't reset which wild Pokemon can spawn, and the last thing in that area of memory was your character's name, not a real spawn table, there are a whole variety of possible outcomes. Pokemon spawn higher than level 100. The Pokemon that spawn are random, depending on the characters in the player's name. And Missingno appears, when there is no real Pokemon corresponding to the data in the table.
It is impossible, the bike costs 1,000,000, but you can only hold 999,999.
The Bike Shop has a store in Cerulean City, which sells Bicycles produced by the company. Designs range from a plain city bike to fast mountain bike; however the player only ever gets one: the Bicycle. It can be bought for 1,000,000, or exchanged for a Bike Voucher. However, as only 999,999 can be obtained at any time, there is no way to buy a Bicycle without a Bike Voucher. The Pokémon Fan Club Chairman in Vermilion City will give out his Bike Voucher, making this the only viable way to get the item.
Source: Cerulean City
Best Answer
No, it's not possible to break sequence and visit Diglett's Cave early.
However, the exit to Diglett's Cave (from Vermilion City) is close to the Viridian Forest. You need access to Cut in order to reach it, however, which is not available until after you finish the S.S. Anne in Vermilion City, thus blocking a sequence break there.