One common speculation behind this was for it to dry the ink faster.
Now, this seems like a conspiracy theory at work, since caps with holes at the end do contribute to drying the ink on the pen nib making it slightly harder to use each time you start writing with it. A few borderline paranoid users used to believe that companies did this on purpose to reduce the ink life forcing one to buy pens more often. But, that really isn't the case.
Another theory claimed that the hole in the cap helped equalize pressure when one opened and closed it.
While the hole does end up serving the purpose of equalizing the pressure to make it easier opening and closing the cap, a lot of the pens had holes into the sides of the caps making the pressure problem redundant. While quite a few kinds of pens have caps that can be screwed on, making air pressure not a problem at all.
So, what is the real reason?
The pen caps have holes in them to prevent suffocation, in case they were swallowed. One of the oldest and more popular ballpoints were the Bic Cristal who originally made it part of their design to include a small hole at the end of the cap. Considering that pen caps were one of the common objects swallowed by children causing them to choke and proved fatal. The hole was put in to allow passage of air in case the dreadful event happened; since, we all love putting them in our mouths!