How to decide what subcarrier allocation should I use in OFDM?
As is typical, the answer is that it depends. In most cases, you're implementing a system that someone else has designed already, and you just need to match their design. However, if you're in the situation of designing a system of your own, then there are a few high-level considerations:


Data subcarriers are the ones that actually communicate information through the channel. Ultimately, the goal of any communications system is to transfer information with as little energy and time expended as possible, so maximizing the number of data subcarriers used in each symbol helps to reach the second of the two goals. 
Null subcarriers don't do anything for information transmission; instead, they are used to shape the spectrum of the transmitted signal. Therefore, we would want to minimize the number of null subcarriers that are in use, as they reduce the information rate of the system. They are often used for two reasons:


Allowing some room for analog anti-aliasing filters. In a practical system, you'll need to leave some portion of the upper end of the frequency band near the Nyquist rate empty to allow for rolloff of pre-ADC and/or post-DAC filtering. Typically, you'll see the upper ~10-25% of the band unused.
Exclusion of the center bin in the band. Common, low-cost direct conversion receivers usually exhibit a high level of interference at band center (due to ADC DC offset after the conversion step). Therefore, it's common in wireless standards that are aimed at low-cost markets to just place a null subcarrier in that slot to avoid the potential interference.

Pilot subcarriers are used in the equalization process. Again, since their contents are known to the receiver a priori (or else they wouldn't be useful as pilots), they don't convey any information through the channel. So, one would want to minimize the number of pilot subcarriers in use. However, you want to have enough of them so that you can effectively estimate the response of the channel across the entire frequency band. This is why you'll often see them spaced across the OFDM symbol. Also in many cases, the pilot positions will rotate over time, allowing the receiver's equalizer to periodically get a view of the entire channel response.


Note that the number of subcarriers doesn't define the channel bandwidth. OFDM transmitters are often implemented using an IFFT structure so you can lay out the subcarriers in the frequency domain first, then transform to the time domain to get a waveform that you can apply to the channel. The sample rate that is used on that waveform, along with the subcarrier allocation and FFT size, is what defines the bandwidth of the transmitted signal. You can increase the FFT size arbitrarily while still maintaining the same signal bandwidth (you will just end up with more lower-rate subcarriers that are spaced more finely in the frequency domain).