If I shot an infinitely strong laser beam into the sky at a random point, how much damage would it do?
A lot of the time, if a question includes the word "infinity," the answer is "an infinite amount"—when there's an answer at all.
An infinitely strong laser pointer would deliver an infinite amount of energy to the air in its path, which would in turn radiate an infinite amount of energy in all directions, which would destroy everything. For more on this, see What If #13.
Except that's not really the right answer to your question. Most of our equations don't really work when you put "infinity" in them. So the right answer is "an infinitely strong laser beam isn't a real thing."
But if you made a laser pointer stronger and stronger, the result would look more and more like what I described. This is sort of like the mathematical idea of taking a limit; you can't say what happens at infinity, but you can see how it acts as you get closer and closer to it.
Since we looked at the "destroying the world" consequence in question #13, let's look at the other part of your question: The random aiming.
First of all, if you aimed in a truly random direction, you would have an almost 50% chance of hitting the Earth.
Almost 50%, but not quite. If we assume you're on a spherical Earth, ignoring hills and trees,And ignoring refraction. you have a slightly better chance of missing the ground than hitting it—because you're holding the laser above the surface, and the Earth curves away from you:
If you miss the Earth, 89,999 times out of 90,000, your beam will pass right out of the galaxy without hitting anything. When it does hit something, it will almost always be the Sun or the Moon.
The first time I met astronomer Phil Plait in person, he mentioned a clever trick for calculating the "area" of the sky:"Learn This One Weird Trick,"" he said, "Invented By a Local Schoolteacher!"He didn't say that.
The area of a sphere is 4πr2. Ok, great, but what's the "radius" of the sky? Well, if the sky is a sphere around us, the radius is "one radian", because that's the radius of anything. But a radian is also 57.3 degrees, which means the sky is 57.3 degrees "away" from us. 4 times pi times 57.3 = 41,253 square degrees.
The Moon and the Sun each take up about 0.2 square degrees, and so the chance of hitting either one of them is about 1 in 180,000. Those aren't great odds, but they're better than the odds of hitting anything else.
To calculate the odds of hitting something else, we can use this handy angular size reference as a shortcut, dividing the rough angular size of the object in the chart by the Earth's total area to see how much of the sky it covers. The odds of hitting one of Jupiter's moons, for example, are on the order of one in a trillion.
Stars are even worse. Your odds of hitting any star at all on your way out of the galaxy are almost zero, even if you aim for the core.
This is good, though! If your odds of hitting a star were high, it would mean the galaxy would be opaque. Since most "lines of sight" would terminate on a star, it would be very hard or impossible to see past our galaxy.There are only a few stars in our galaxy in the Hubble Ultra-Deep Field image. The fact that the night sky is dark is at the core of Olbers' Paradox.I was so tempted to vandalize this article to put a  after every claim that the night sky was dark.
If you kept shooting long enough, eventually you'd hit a planet. Neptune would be the hardest to hit, followed by Uranus and Mercury. Pluto would be the hardest, but it might be worth it. An impossibly powerful laser would at least settle that debate.