A basketball is designed to bounce continuously and consistently throughout several games and seasons of use. The key to ensuring a good bounce is proper maintenance and consistent air pressure. The air pressure inside a basketball has the biggest affect on bounce, but you should consider outside air pressure and temperature when pumping up your ball.
Basketballs are inflated with air to make them bounce. When inflated, the basketball's elastic bladder is capable of rebounding when dropped or dribbled on a hard surface. In general, the higher the air pressure is inside the basketball, the higher it will bounce. If a ball is not inflated fully, it will bounce low and erratically. On the other hand, excessively over-inflating a ball might break the bladder and cause leaks, negatively impacting the consistency of the ball's bounce.
In most situations, the air pressure surrounding the a basketball is fairly constant, but environmental air pressure can affect a basketball. At higher altitudes, the air is thinner, or less dense. When the air is thinner, objects are not as affected by air resistance pushing against them as they bounce or fly through the air. It is unlikely that outside air pressure would ever affect the bounce of a basketball enough to impair the game, but it does contribute to bounce height.
According to the ideal gas law, the pressure of contained volumes of gas change with temperature. This basic physical law has serious real-world implications for the bounce of a basketball. When the air temperature around a basketball increases, the pressure inside the ball increases. When the air temperature decreases, so does ball pressure. If you leave your ball outside on a cold night or in the hot trunk of your car, chances are the pressure inside and the resulting bounce will be affected.
According to NBA rules, the pressure inside a basketball must be between 7.5 and 8.5 lbs. You can use this as a guide for your own basketball pressure. Another simple test is to drop the ball from shoulder height. It should bounce to a height approximately even with your hips. When inflating the ball, use a small pump and pressure gauge. Avoid using high pressure pumps made for cars and motorcycle tires, which can easily over-inflate and damage your ball.