Pokémon Ruby and Sapphire/Cave of Origin

In Sootopolis City, the weather has gone awry. If you are playing Ruby, is causing strong sunshine, or in Sapphire,  is causing heavy rain. Each of the two Pokémon is searching for the other to kill it. You must stop this.

Go to the northwest of Sootopolis City. Steven will meet you and introduce you to the Gym Leader Wallace. On seeing the Orb that you're holding (Red Orb in Ruby and Blue Orb in Sapphire), Wallace takes you to the Cave of Origin.

The Cave
It is dark inside the cave so bring a Pokémon that knows Flash to light it up. The cave is shaking due to the roars of the legendary beast. Inside a misty chamber, you'll find HM07(Waterfall). Grab it and simply continue down the ladders. At the bottom of the cave, you'll find the mighty Pokémon. Your Orb will start glowing as soon as you stand face to face with it. So save the game before that. This is a must, because here awaits your ultimate dream. And you must pursue it, bearing some failures.

The Orb will strip the legend of all the powers that the criminals of the game (Team Magma or Team Aqua) had given it. In a rage it attacks you. It's battle time. In Emerald you won't fight Groudon nor Kyogre in the Cave of Origin. You will have the chance of capturing both at level 70 as indicated in the pictures. They will be in certain areas where there is a lot of sunlight/rainfall. They can be located with the help of the Weather Institute people.

Battling Groudon
Paralyse Groudon first of all using the Stun Spore move. Note that its ability Drought brings bright sunshine on the battlefield. The TM move Solarbeam works faster in sunshine. So use this attack once to blow away more than 90% of Groudon's HP(your Pokémon should be at a lower level than Groudon[Level 45], or else Groudon gets knocked out!). Preferable is to preserve this TM and teach it to Groudon after it's caught. In that case, use gentle Water type attacks like Water Gun, again of a weaker Pokémon. Or use Rock type attacks as they cause little damage to Groudon.

Once its HP is barely left, start chucking out Ultra Balls. A paralysed Groudon will be caught in less than 10 Ultra Balls but carry 30 of them, to be safe(Don't sell away the leftover balls as they can be used later, and you get less money back than what you had paid).

Even if Groudon is put to sleep, Ultra Balls do work well but it wakes up some time later, so paralysis is better as it doesn't get cured with the passage of time.

Remember to be equipped with Hyper Potions and Revives, as any Pokémon of yours will be defeated by Groudon while watching the shower of Ultra Balls.

Battling Kyogre
too is at Level 70 but much easier to battle. Paralyze it first and then send out a of any level below 45 (even a newly born Shedinja at Level 20 will do the job!). None of Kyogre's present moves (Body Slam, Calm Mind, Ice Beam or Hydro Pump) will do any damage to Shedinja, whereas Groudon's Fire-type move, Fire Blast, can knock it out. Weaken Kyogre and then lay your hands on it at the cost of 10 Ultra Balls.