For the first time in five years of being subscribed, I actually have the knowledge and sources to contribute an answer to Askhistorians.
Unfortunately, I cannot provide a broad answer to this question, but what I can give is one case illustrating the interaction between the US military and Mafia bosses during WWII.
Lucky Luciano was a high level figure in the Italian American Mafia in New York in the 1930s, heavily involved in prostitution, gambling, and a variety of other extra-legal trades. In 1936, he was given a 30-50 year sentence for involuntary prostitution.
In 1946, however, Lucky had his sentence commuted. He was released from prison, under the condition that he return to his native Italy. Of course, after his release, he more or less continued business as usual, though run from outside the US, and actually made it to Havana for a bit, at which point he helped establish the American Mob in Cuba. But that's a different (though even more interesting) story.
Where Lucky's story relates to the question comes in that stretch between getting arrested, and getting paroled after doing ten years on a 30-50 year sentence. According to multiple sources from within the US Navy (as reported by newspapers at the time), Lucky assisted US war efforts against Germany and Italy throughout WWII. According to these sources, he provided intelligence regarding collaborators on the New York City waterfront, where he still held considerable sway.
Now, as soon as he was paroled, the entire case blew up in the public imagination in a firestorm of rumor and intrigue, with various newspapers at the time painting lurid pictures of the close relationship between Lucky and the Navy, and the Navy desperately denying that Lucky had had anything to do with them, as can be expected.
I've done a fair amount of primary source work on this topic, mostly looking at FBI surveillance records released under FOIA, regarding the multi-decade surveillance of Luciano. It is my opinion, based on these primary sources, that Luciano did in fact collaborate with the Navy during the war, which secured his post-war release.
While this is just one case, the nature of the way in which it was exposed to the public, and the degree to which it was dogmatically denied by the powers that be, allow us to extrapolate a little bit. It is quite likely that, if one mob boss was used for intelligence, this was a strategy that was at least explored regarding other bosses. At the same time, the fury that the collaboration between Lucky and the Navy (not to mention Lucky's subsequent parole) was regarded with suggests that open Mafia support of the US war effort did not really exist.
Sources:
My knowledge on this topic actually comes from a paper I wrote on FBI surveillance of American mob bosses in Cuba in the 1950s, so my secondary sources tend to be geared towards that side of things, but they do provide some interesting information on this subject nonetheless:
Rovner, E.S. The Cuban Connection: Drug Trafficking, Smuggling, and Gambling in Cuba from the 1920s to the Revolution (2008)
English, T.J. Havana Nocturne How the Mob Owned Cuba... and then Lost it to the Revolution (2008)
Schwartz, Rosalie, Pleasure Island: Tourism and Temptation in Cuba (1997)
However, far and away the best sources on this are the FBI's own surveillance records. You can search for them in academic databases under the title:
"Mafia in Florida and Cuba: FBI Surveillance of Meyer Lansky and Santo Trafficante, Jr"
The files with information on Lucky and his actions during WWII are referenced with the name and number:
Charles "Lucky" Luciano, NY 62-8768, 1. February 21st, 1946
Hi, friends,
You might notice that this thread currently has (ETA) nearly all its comments removed. We share your frustration, but we have a longstanding policy that no answer is better than a bad answer.
AskHistorians seeks to connect people with questions about history to those with expert-level knowledge in the topics at hand.
AskHistorians is not the place to audition for a role as a Sopranos screenwriter.
Any attempts at an Italian-American accent, rudeness to other posters, auditions for the AskHistorians mod team via rudeness to other posters, links to Wikipedia, quotations from Family Guy, debates on the scope of the term "mafia", and use of 21st-century video games as a historical source will be quietly and lawfully removed from view, and perpetrators reprimanded in accordance with established subreddit policy.
Thanks!