They take on some of the roles of modern MP, following inquires, enforcing laws, ect. On the other hand, they don't manage traffic or do anything with riot or crowd control (unless it's with a single bolt to the head to keep everyone else in line).
In short, no, they're not really military police. They're something unique.
The police, however, is filled by the Arbites on the civilian side, and on the military side, either by Commissar's, or by other Schola Progenium heavies - notably Storm Troopers on naval vessels, although Armsmen (as seperate from chaingangs/press ratings) are known to help NCO's in this matter. I've yet to find a reference to the equivalent of Red caps in 40K, although I could be mistaken.
Storm Troopers don't police anything. They're elite combat troops used to exploit weaknesses in enemy lines, as a rapid relief force for holes in friendly lines, or used for behind enemy line sorties (deep recon, assassination, ect). I'm not quite sure where you got that they were some sort of police force.
I'm not sure naval armsmen are used for policing either. They're usually used to escort or guard prisoners on the ship or to enact or repulse boarding actions. I think the closest thing I've heard about naval police would be the provosts in the first Cain book.