As far as I can tell, based on the code there's a small degree of randomization to how the napalm spreads or disperses each time it's used, but from my experience, it also has some bugs in both how it spreads and how/when it inflicts damage. Sometimes it won't spread as much as it should, sometimes it will glitch and not ignite at all (you'll get a single explosion effect, not the napalm visual effect or burning) which happens in very specific locations, like certain parts of the beach on Operation Irving, and as has been pointed out, sometimes it simply doesn't do damage when it should. What I've noticed is that the spread and damage inflicted has some connection to the type of terrain the bomb lands on. This isn't something that can be possibly determined just by looking at the map, as it has less to do with how you see the terrain and more how the game sees the terrain. What type of ground (sand/dirt/grass/mud/etc.) determines the effects, and there are some that seem to have been programmed incorrectly.
Assuming no glitches, the optimum spread is a long streak of napalm that widens out towards the front end (sort of like a wide letter "T"). The wider part is always guaranteed to do damage, while the narrower part might or might not do damage. When bombing the air control towers on Operation Flaming Dart, for example, I like to time my napalm bomb drops so that wide part bursts right on the tower I'm targeting, which does the most damage.
Another thing that affects the napalm spread is your flight angle and speed. The faster you're going, the more it will spread (usually, but sometimes it won't, which seems to be part of the "glitchy" behavior), and the bomb's angle of impact will also have an effect on the spread. If you come in at a dive on your target and drop your bomb from directly above, it typically won't spread much at all, but if you can get the bomb to land more horizontally, it'll spread more. So randomization aside, the best approach is low above your target, at maximum speed.
To have an even better chance of getting a good spread, come in slightly below the altitude at which you want to release the bomb, and then climb sharply, releasing the bomb a fraction of a second into your climb. The front end of the bomb drops faster than the rear end, and by starting to climb just before you drop the bomb, the front end will start out higher than the rear end, which means by the time the bomb hits the ground, it will be very close to perfectly horizontal.
Another thing you can do that also helps is to dive from a high altitude towards a point on the ground before your target, and then swoop back up, releasing the bomb as you begin to climb again. This gives you that upwards angle I mentioned above, but also allows you to give even more speed to the bomb, further helping to ensure a wide, destructive spread.