Over time pepper will start to lose some of its essential oils, so you will not want to keep it around for too long. It is probably a good idea to use up the pepper that you bring home from the store within a reasonable amount of time, just so you will not have to worry about it going stale, though it takes quite a while for this to happen.
Even though using expired pepper may not make the dish you are using it on taste very good, there is no risk of food poisoning or anything of the like, so it isn’t something you will have to worry about. If you want to give your food the best taste possible though, it is important to use fresh pepper on it.