In Minecraft 1.6.4 the following check is made:
if (this.worldObj.canLightningStrikeAt(this.posX, this.posY + 1, this.posZ))
This will check if rain can reach the block AND if it is raining. If that is true the possibility to catch a fish goes up from 1 in 500 to 1 in 300
From EntityFishHook.java: