If the rifle has front and rear iron sights then you can simply tie some fishing line between the two and carefully measure or simply eyeball the holes in relation to the fishing line.
If it doesn't have iron sights then a simple (and less accurate) process is to buy a piece of round stock or metal tubing (from the hardware store) that will fit inside the rings (call it an alignment gauge). Removing the scope and installing the gauge in it's place will allow you to compare the gauge to the barrel and compare the fit of the rear ring to the front ring. The gauge needs to be long, the longer the better but no more than the barrel length. If you have a set of 20 MOA mounts you might want to make the gauge about half the length of the barrel plus the distance between the rings. It also helps if the gauge can be turned on a lathe so that the portion that would be over the barrel is the same diameter as the barrel but it's not necessary. If you can get the gauge the same diameter as the barrel it would be easier to estimate it's position along the sides of the barrel. Regardless, if you look at the gauge from the muzzle end of the rifle you will be able to see if it's offset to the left or right of the barrel.
If you install the gauge in the forward ring (with the gauge clamped by both rings halves) you can measure or eyeball the gauge as compared to the barrel. This will help you determine if the front ring/mount/holes are aligned with the barrel, if the gauge looks aligned with the barrel (as you look from the muzzle toward the receiver) then the front ring/mount/holes are aligned with the bore. Clamp the gauge in the front ring first to check it's alignment with the barrel and then do the same using the rear ring with the top half of the front ring removed. The gauge should still be in alignment with the barrel and it should also fit the bottom half of the front ring properly. Installing the gauge in to both rings will help identify if the rings are aligned to each other which also indicates whether the mount holes are aligned. Take the top of the rings off of both rings and install the gauge in to the bottom halves, the gauge should settle in to both rings solidly, you shouldn't be able to rock it in any direction. If the gauge rocks and you've already verified that the front ring is properly aligned with the barrel then that means that the back ring has an alignment problem.
One other test is to verify that the mounts fit properly. You can do that by loosening the screws for the mount by backing them out no more than two turns. Do this on one mount at a time. Once the screws have been loosened try to rock the mount, it shouldn't. If it does rock then either the curve on the bottom of the mount isn't properly shaped or the holes don't line up, inspection should prove which is the case.