Black pepper is one of the ultimate store cupboard essentials, that no kitchen should be without. Lending a tart spiciness to everything from soups to roast joints, black peppers have been a part of cuisine for thousands of years, from Europe to India.
This rich history begs the question of why you would want an alternative or substitute for the spice, which has also been shown to improve the absorption by the body of Vitamin B and Beta-Carotene, among other useful nutrients.
But, if for whatever reason, presumably an allergy, you feel like setting aside your trusty peppermill full of whole peppercorns (grinding black pepper fresh really is the only way to fly), there are a few other options for you...
The simplest of course is white pepper! White peppercorns actually come from the same plant as black peppercorns, but the product consists of just the berry's seed, while the production process for black pepper dries the whole berry. It's useful in things like mashed potato or a creamy sauce, where using black pepper would stand out, possibly to the extent of making it look like a bird had visited your dinner.
In addition, you can also get pink peppercorns, green peppercorns (these are made from unripe berries) and Sichuan peppercorns, my personal favourite. But we're still casting our net around the Piperaceae family, and there are other options.
Allspice, for example, has a similar level of heat to black pepper, and if you're making something like Garam Masala (an Indian spice blend, including cloves, cinnamon and other spices), it will make a more than effective substitute. The flavour is different though, so if black pepper is a major ingredient of your sauce, or if you're using it as a simple condiment, you may wish to look elsewhere.
Another spice that I've used as a black pepper substitute in my Indian cooking is Kalonji, otherwise known as Nigella Seeds, otherwise known as Onion Seeds. These hard black little seeds, scattered whole in the closing stages of cooking a curry, do have a flavour similar to black pepper, though they are a bit mustardy, and can add a welcome bit of texture to a masala (or gravy). They also release the most captivating aroma when fried.
While researching this piece, I also stumbled across the following spice, Grains of Paradise. Apparently related to ginger, and used as an inexpensive alternative to black pepper through history, though now relegated to being used largely in Africa, it looks like a pretty good match to the trusty peppercorn, and should be different enough chemically to avoid any allergen problems. I've ordered some of this and will be making a few curries over the next month or so to research its flavour myself. Purely out of academic interest, you understand.
Enjoy your food.