The description for the dive ball is, "A somewhat different Poké Ball that is more effective when catching Pokémon in or on the water." So for Kyogre that would be a big ol YES but for lugia it depends on where it spawns I'm not really sure but if you encounter lugia and there is water below it, the dive ball should work.